限制在设备端 Android 容器中加载
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
设备端 Android 容器是指在 Android 设备上模拟 Android OS 的应用。这包括模拟 Android OS 的全部或部分内容的应用。
如果您不希望设备端 Android 容器应用加载或代理您的 Play 商店应用,可以在应用清单中添加一个字符串来声明此限制。
在 Android 清单中的 <application>
下创建一个属性,并将 android:name
设置为 REQUIRE_SECURE_ENV
,将 android:value
设置为 1:
<property android:name="REQUIRE_SECURE_ENV" android:value="1" />
对于此用例,无论在哪个 Android 版本上运行应用,您都可以使用 REQUIRE_SECURE_ENV
属性。
设备端 Android 容器应用必须遵循此声明。
如需详细了解设备端 Android 容器,请参阅帮助中心。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-01-10。
[null,null,["最后更新时间 (UTC):2024-01-10。"],[],[],null,["# Limit loading in on-device Android containers\n\n*On-device Android containers* are apps that simulate the Android OS on an\nAndroid-powered device. This includes both apps that simulate the Android OS in\nits entirety and apps that only simulate portions of the Android OS.\n\nIf you don't want on-device Android container apps to load in or proxy your Play\nStore app, you can add a string to your app manifest that declares this\nrestriction.\n\nCreate a [property](/guide/topics/manifest/property-element) under the\n[`\u003capplication\u003e`](/guide/topics/manifest/application-element) in your Android\nmanifest with `android:name` set to `REQUIRE_SECURE_ENV` and `android:value` set\nto 1: \n\n \u003cproperty android:name=\"REQUIRE_SECURE_ENV\" android:value=\"1\" /\u003e\n\nFor this use case, you can use the `REQUIRE_SECURE_ENV` property regardless of\nthe Android version that your app runs on.\n\nOn-device Android container apps are\n[required](https://support.google.com/googleplay/android-developer/answer/9888379)\nto respect this declaration.\n\nFor more information about on-device Android containers, see the [Help\nCenter](https://support.google.com/googleplay/android-developer/answer/13609005)."]]