当用户首次打开 Web 应用时,系统会在屏幕底部显示一条通知,告知用户他们当前是在浏览器中,而不是在原生应用中。
图 2. 在用户首次打开 Web 应用时向其显示的通知。
图标
指定图标有助于用户识别 Web 应用。对于未指定图标的任何 Web 应用,Google 都会插入并显示相同的默认图标。为了让用户更轻松地区分应用,我们强烈建议您为网站应用创建具有独特含义的图标。
IT 管理员可以在 Google Play 企业版 iframe 中为其创建的 Web 应用设置单个图标。
使用此 API 创建 Web 应用时,您可以允许 IT 管理员设置多个图标。这些图标将全部嵌入到 Web 应用的 APK 中,Android 系统将显示最适合设备显示分辨率的图标。受管 Play 商店始终会显示为 Web 应用指定的第一个图标。
第一个图标最好是 512 x 512 像素的正方形。
接受 PNG 和 JPEG 格式,但不得超过 1MB。
不符合此格式的图标将针对受管 Play 商店条目重新缩放。该图标还需要具有“可遮罩”属性,以便根据每个系统调整其形状。如需了解详情,请参阅可遮盖式图标。
您可以通过在 EMM 控制台中嵌入 Google Play 企业版 iframe 或与 API 集成来创建 Web 应用。这两种方法可以互换使用,在设备上提供相同的最终用户体验,因此您可以自行决定哪种方法最适合您的解决方案。
方式 1:嵌入 Google Play 企业版 iframe
Google Play 企业版 iframe 包含一个界面,供 IT 管理员创建、修改和删除 Web 应用。如果您选择通过此选项支持 Web 应用,请按照相关说明将 Google Play 企业版 iframe 嵌入到您的 EMM 控制台中。您可以通过 iframe 的左侧导航菜单访问 Web 应用界面。
在 iframe 中创建 Web 应用后,需要等待几分钟才能在界面中选择该应用。选择网站应用后,系统会触发 onproductselect 事件,并在事件中传递网站应用的软件包名称。
请注意,Google 还会定期刷新您的 Web 应用以更新 Chrome 封装容器。这不会影响企业或其用户,但其 Web 应用的版本号会发生变化,并且 Play 商店会在下次方便时自动更新这些应用。
删除 Web 应用
借助 Google Play 企业版 iframe,IT 管理员可以删除 Web 应用。您可以使用此 API 调用 webApps.delete 来删除 Web 应用。删除 Web 应用后,系统会将其从受管 Play 商店中移除,但不会从设备上卸载该应用。如需从设备上卸载 Web 应用,请在设备政策中将应用的 installType 设置为 BLOCKED。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eWeb apps transform web pages into Android apps, enhancing accessibility and usability on mobile devices by integrating them into the device's launcher.\u003c/p\u003e\n"],["\u003cp\u003eTo create a web app, you need to define its title, start URL, display mode (minimal UI, standalone, or fullscreen), and optionally an icon for user identification.\u003c/p\u003e\n"],["\u003cp\u003eWeb apps can be created and distributed either by embedding the managed Google Play iframe or by integrating with the web apps API, offering flexibility in management approaches.\u003c/p\u003e\n"],["\u003cp\u003eDistributing web apps involves adding their package name to a device's policy, ensuring Google Chrome is installed for display mode support.\u003c/p\u003e\n"],["\u003cp\u003eUpdating a web app is possible via the managed Google Play iframe or the API, with updates taking time to propagate, and deleting a web app removes it from the managed Play store but requires policy changes to uninstall it from devices.\u003c/p\u003e\n"]]],["Web apps convert web pages into Android apps, displayed in the user's default browser. Key components include a title (under 30 characters), a start URL (HTTPS or HTTP), a display mode (Minimal UI, Standalone, or Fullscreen), and an optional icon. Web apps can be created and managed via the managed Google Play iframe or API, using `webApps.create`, `webApps.patch`, and `webApps.delete` respectively. Distribution involves adding the app's package name to a device's policy. Chrome installation is recommended for optimal display mode support.\n"],null,["Support web apps\n================\n\nA web app turns a web page into an Android app, making it easier to find and simpler to use on\nmobile devices. A web app looks like a native app in a device's launcher. When opened, the web\npage is rendered in the user's default browser (*Settings\\\u003eApps\\\u003eDefault apps\\\u003eBrowser app*)\nand displayed according to the browser's capabilities.\n\nYou can distribute web apps the same way you can native apps. This includes adding them to\ncollections in the managed Google Play store and remotely installing them on devices.\n| **Note:** In order to offer the best web app experience to users, we recommended following the [Progressive Web Apps](https://developers.google.com/web/progressive-web-apps/) best practices when building your website.\n\n*** ** * ** ***\n\nComponents of a web app\n-----------------------\n\nTo create a web app, you need to specify:\n\n- a **title** that is shown on the device on the managed Play Store and on the launcher,\n- a **start URL** that the web apps opens to,\n- a **display mode** that defines how the web app is displayed on the device.\n\nYou can also set an **icon** for the web app to help users identify it. Icons are\noptional, but recommended.\n\n### Title\n\nThe title must be fewer than 30 characters. Depending on the form factor of the device, a web\napp's title may be truncated in the managed Play store and in the device's launcher. We therefore\nrecommend specifying short title.\n\n### Start URL\n\nThe start URL of a web app defines the page the web app opens to. The user can then navigate to\nother URLs.\n\nThe start URL must be a `HTTPS` or `HTTP` URL. The URL of the web app must\nhave the `HTTPS` scheme when the display mode is full screen or standalone.\n\n### Display mode\n\nThe display mode describes what browser UI elements are visible when a web app is opened:\n\n- **Minimal UI:** the URL bar is shown at the top and the system status bar and navigation buttons are visible. For `HTTP` URLs, this is the only available option.\n- **Standalone:** the URL bar is not shown and the system status bar and navigation buttons are visible.\n- **Fullscreen:** the URL bar is not shown and the system status bar and navigation buttons are hidden; the websites's interface must provide all navigation controls.\n\n**Figure 1.** From left to right: Minimal UI, Standalone, and Fullscreen display modes. **Important:** Web app display modes (e.g., minimal UI, standalone, fullscreen) depend on the user selected default browser's compatibility. It is important to note that some browsers may not support all of these features. IT admins should verify browser compatibility before deployment.\n\nThe display mode is only applied to pages of the same domain as the start URL. If the user\nnavigates to a URL of a different domain than the start URL, then this new page will open in a\n[Chrome Custom Tab](https://developer.chrome.com/multidevice/android/customtabs) with\nthe new URL visible to the user, regardless of the selected display mode. For example, if the\nstart URL immediately redirects to a URL of a different domain, then this page will be displayed\nin a Chrome Custom Tab.\n\nWhen a user first opens a web app, a notification at the bottom of the screen is shown to inform\nthem that they are in a browser rather than a native app.\n**Figure 2.** Notification shown to a user the first time they open a web app.\n\n### Icon\n\nSpecifying an icon helps users identify a web app. For any web app that doesn't have a\nspecified icon, Google will insert and display the same default icon. To make it easier for your\nusers to distinguish between their apps, we strongly recommend creating web apps with distinct,\nmeaningful icons.\n\nIT admins can set a single icon for the web apps they create in the\n\n\n[managed Google Play iframe](/android/management/apps#web-apps).\n\n\nWhen using the API to create web apps, you can allow IT admins to set multiple icons. These icons\nwill all be embedded into the web app's APK and the Android system will display the one that's\nmost suitable for the device's display resolution. The managed Play store always displays the\nfirst icon specified for a web app.\n\nThe first icon should ideally be a 512x512 pixels square.\nPNG and JPEG are acceptable formats but must be no larger than 1MB.\nIcons that don't adhere to this format will be rescaled for the managed Play store entry. The icon\nalso needs to be \"maskable\" to adapt its shape for each system. See\n[Maskable icons](https://web.dev/maskable-icon/) for details.\n\nWhen using the API the icon data must be encoded in base64url format (i.e. base64 but any '+'\nis replaced with a '-' and any '/' replaced with a '_' --- \\[see\n[RFC 4648, section 5](https://tools.ietf.org/html/rfc4648#section-5) for details\\]).\n\n*** ** * ** ***\n\nCreate a web app\n----------------\n\n| Follow the **[web apps notebook](https://colab.sandbox.google.com/github/google/android-management-api-samples/blob/master/notebooks/web_apps.ipynb)** , to get started with creating and distributing web apps. This notebook builds on the [quickstart Colab notebook](/android/management/quickstart), and assumes that you've already created an enterprise and provisioned a device.\n\nYou can create web apps either by embedding the managed Google Play iframe in your EMM console or\nby integrating with the API. The two approaches are interchangeable and offer the same end-user\nexperience on devices, so it's up to you to decide which approach works best with your solution.\n\n### Option 1: embed the managed Google Play iframe\n\nThe managed Google Play iframe includes a user interface for IT admins to create, edit, and\ndelete web apps. If you choose to support web apps through this option, follow the instructions to\n\n\n[embed the managed Google Play iframe](/android/management/apps#add_the_iframe_to_your_console)\n\n\ninto your EMM console. The web app interface is accessible from the iframe's left navigation menu.\n\nAfter a web app is created in the iframe, it takes a few minutes before the app can be selected\nin the interface. When a web app is selected, an\n\n\n[`onproductselect`](/android/management/apps#step_3_handle_iframe_events)\n\n\nevent is triggered with the web app's\n\n\npackage name\n\n\npassed in the event.\n\nUsing a web app's\n\n\npackage name,\n\n\nyou can [distribute it to users](#distribute-a-web-app).\n\n### Option 2: integrate with the API\n\nAnother way to support web apps in your EMM console is to integrate with the web apps API. To\ncreate a web app, use the method\n\n\n[`webApps.create`](/android/management/reference/rest/v1/enterprises.webApps/create).\n\n\nWeb apps created through the API can be added to policy immediately after creation. However, it\nmay take several minutes before they are installed on devices or becomes visible to the user in\nthe managed Play store.\n\nDistribute a web app\n--------------------\n\nYou can distribute a web app just like any other app---by adding the\n\n\npackage name returned by the iframe or API to a device's\n[policy](/android/management/reference/rest/v1/enterprises.policies#applicationpolicy).\n\n\nFor a device to support a web app's display mode, it must have Google Chrome\n(package name `com.android.chrome`) installed. To ensure that Chrome is installed on\nthe device, we recommend adding it to a device's policy and setting\n\n\n`installType` to `FORCE_INSTALLED`.\n\nIf Google Chrome isn't installed on the device, then opening the web app will show a dialog\nindicating that the Google Chrome must be installed.\n\nUpdate a web app\n----------------\n\nThe managed Google Play iframe allows IT admins to edit the web apps they publish. Using the API,\nyou can update any aspect of a web app by calling\n\n\n[`webApps.patch`](/android/management/reference/rest/v1/enterprises.webApps/patch). The\nmethod takes the app's name in addition to the same parameters as\n[`webApps.create`](/android/management/reference/rest/v1/enterprises.webApps/create).\n\n\nUpdates take a few minutes to up to 24 hours to propagate across all devices, depending on the\n[app update settings](https://support.google.com/googleplay/work/answer/9350374). In\nsome cases, users may need to clear the cache from their device's launcher app before any updates\nto web app titles are reflected in the launcher.\n\nNote that Google will also periodically refresh your web apps to update the Chrome wrapper---this\nwon't affect enterprises or their users except that their web app's version numbers will change\nand the apps are automatically updated by the Play store at the next convenient time.\n\nDelete a web app\n----------------\n\nThe managed Google Play iframe allows IT admins to delete web apps. Using the API, you can call\n\n\n[`webApps.delete`](/android/management/reference/rest/v1/enterprises.webApps/delete)\n\n\nto delete a web app. Deleting a web app removes it from the managed Play store, but doesn't\nuninstall it from devices. To uninstall a web app from a device,\n\n\nset the app's `installType` to `BLOCKED` in the device's policy.\n\n\u003cbr /\u003e"]]