{"id":9711,"date":"2021-12-10T23:55:15","date_gmt":"2021-12-10T23:55:15","guid":{"rendered":"https:\/\/www.applivery.com\/?post_type=docs&#038;p=9711"},"modified":"2024-06-03T12:16:54","modified_gmt":"2024-06-03T12:16:54","password":"","slug":"sample-policies","status":"publish","type":"docs","link":"https:\/\/www.applivery.com\/pt-br\/docs\/mobile-device-management\/android-mdm\/policies\/sample-policies\/","title":{"rendered":"Android Management sample policies"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"9711\" class=\"elementor elementor-9711\" data-elementor-post-type=\"docs\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5fd13a1 e-con-full e-flex e-con e-parent\" data-id=\"5fd13a1\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d92a5ce elementor-widget elementor-widget-text-editor\" data-id=\"d92a5ce\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>As you probably already know, the possibilities of the Android Devices Management policies configuration are endless. Below you will find a repository of the most common configurations our users use to configure for their projects.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-946cda7 elementor-widget elementor-widget-heading\" data-id=\"946cda7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Kiosk Custom Launcher<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-21ed98d elementor-widget elementor-widget-text-editor\" data-id=\"21ed98d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Replaces the home screen with a launcher that locks down the device to the apps installed via the applications setting. Apps appear on a single page in alphabetical order.<\/p><ul><li>Kiosk Custom Launcher Enabled = <code>true<\/code><\/li><li>Kiosk Customization (optional): there are many options available that you can use to customize Custom Kiosk mode behavior.<\/li><\/ul><p>We always recommend to enable <strong>Network Escape Hatch<\/strong> (<code>networkEscapeHatchEnabled: true<\/code>) since it prompts the user to temporarily connect to a network to refresh the device policy if a network connection can\u2019t be made at boot time.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4e9037f elementor-widget elementor-widget-code-highlight\" data-id=\"4e9037f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>{\n  \"config\": {\n    \"applications\": [...],\n    \"networkEscapeHatchEnabled\": true,\n    \"kioskCustomization\": {\n      \"deviceSettings\": \"SETTINGS_ACCESS_ALLOWED\"\n    }\n  }\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bc6d69a elementor-widget elementor-widget-heading\" data-id=\"bc6d69a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Single app kiosk mode<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-879894e elementor-widget elementor-widget-text-editor\" data-id=\"879894e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>The app is automatically installed in kiosk mode: it\u2019s set as the preferred home intent and whitelisted for lock task mode. Device setup won\u2019t be complete until the app is installed. After installation, users won\u2019t be able to remove the app. You can only set this <strong>Install Type<\/strong> for one app per policy. When this is present in the policy, the status bar will be automatically disabled.<\/p><ul><li>App Configuration:<ul><li>Install type: <code>KIOSK<\/code><\/li><\/ul><\/li><li>Policy configuration (optional)<\/li><\/ul><p>Persistent Preferred Activities:<\/p><ul><li>Receiver Activity: name of your receiver activity i.e.:<code>com.applivery.kiosk.demo001\/.AppliveryDeviceAdminReceiver<\/code><\/li><li>Categories: i.e.<br \/><code>android.intent.category.LAUNCHER<\/code><br \/><code>android.intent.category.HOME<\/code><br \/><code>android.intent.category.DEFAULT<\/code><\/li><li>Actions: i.e.: <code>android.intent.action.MAIN<\/code><\/li><\/ul><p>We always recommend to enable <strong>Network Escape Hatch<\/strong> (<code>networkEscapeHatchEnabled: true<\/code>) since it prompts the user to temporarily connect to a network to refresh the device policy if a network connection can\u2019t be made at boot time.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a684953 elementor-widget elementor-widget-code-highlight\" data-id=\"a684953\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>{\n  \"config\":{\n     \"applications\":[\n      {\n        \"packageName\":\"com.applivery.kiosk.demo001\",\n        \"installType\":\"KIOSK\",\n        \"defaultPermissionPolicy\":\"GRANT\",\n        \"permissionGrants\":[\n         {\n           \"permission\":\"android.permission.BIND_DEVICE_ADMIN\",\n           \"policy\":\"GRANT\"\n         }\n        ]\n      }\n     ],\n     \"persistentPreferredActivities\":[\n      {\n        \"receiverActivity\":\"com.applivery.kiosk.demo001\/.AppliveryDeviceAdminReceiver\",\n        \"actions\":[\n         \"android.intent.action.MAIN\"\n        ],\n        \"categories\":[\n         \"android.intent.category.LAUNCHER\",\n         \"android.intent.category.HOME\",\n         \"android.intent.category.DEFAULT\"\n        ]\n      }\n     ],\n     \"networkEscapeHatchEnabled\":true\n  }\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1a5f587 elementor-widget elementor-widget-heading\" data-id=\"1a5f587\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Web app kiosk mode<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-19650d4 elementor-widget elementor-widget-text-editor\" data-id=\"19650d4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>You can also use Google Chrome in kiosk mode to display a specific URL as a single app, achieving the desired behavior on your dedicated device.<\/p><p>To set up this configuration, follow the steps outlined in the <a href=\"https:\/\/www.applivery.com\/docs\/mobile-device-management\/android\/sample-policies\/#single-app-kiosk-mode\">Single App Kiosk Mode<\/a>\u00a0section above, which involves configuring both the Persistent Preferred Activities setting and the <strong>Network Escape Hatch<\/strong>.<\/p><ul><li>Web app configuration:<ul><li>Install type: <code>KIOSK<\/code><\/li><\/ul><\/li><li>Google Chrome configuration:<ul><li>Install type: <code>FORCE_INSTALLED<\/code><\/li><li>Managed configuration:<br \/><p style=\"padding-left: 40px; margin-bottom: 2px;\">URL allow list:<code>[\"allowed URL\"]<\/code><\/p><p style=\"padding-left: 40px;\">URL block list:<code>[\"*\"]<\/code><\/p><\/li><\/ul><\/li><\/ul><p>* Multiple web apps are allowed, separated by commas, i.e: <code>[\"allowed URL1\", \"allowed URL2\"]<\/code><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e37ecbc elementor-widget elementor-widget-code-highlight\" data-id=\"e37ecbc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>{\n  \"applications\": [\n    {\n      \"packageName\": \"com.google.enterprise.webapp.xbf6a96eb033caa10\",\n      \"installType\": \"KIOSK\",\n      \"defaultPermissionPolicy\": \"GRANT\"\n    },\n    {\n      \"packageName\": \"com.android.chrome\",\n      \"installType\": \"FORCE_INSTALLED\",\n      \"defaultPermissionPolicy\": \"GRANT\",\n      \"managedConfiguration\": {\n        \"URLAllowlist\": \"[\"applivery.com\/docs\/\"]\",\n        \"URLBlocklist\": \"[\"*\"]\"\n      }\n    }\n  ],\n  \"persistentPreferredActivities\": [\n    {\n      \"receiverActivity\": \"com.android.chrome\/com.google.android.apps.chrome.Main\",\n      \"actions\": [\n        \"android.intent.action.MAIN\"\n      ],\n      \"categories\": [\n        \"android.intent.category.HOME\",\n        \"android.intent.category.DEFAULT\"\n      ]\n    }\n  ],\n  \"networkEscapeHatchEnabled\": true,\n  \"kioskCustomization\": {\n    \"systemNavigation\": \"NAVIGATION_DISABLED\"\n  }\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-59fd753 elementor-widget elementor-widget-heading\" data-id=\"59fd753\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Allow install from Unknown Sources<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-99c5e90 elementor-widget elementor-widget-text-editor\" data-id=\"99c5e90\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Sometimes you will need to allow your users to install Apps (<code>.apk<\/code> or <code>.aab<\/code> files) from 3rd parties or your Private App Store in Applivery MAM. This is normally blocked by default in all policies so you will need to customize the following policy property to make it possible:<\/p><ul><li>Advanced Security Overwrites<ul><li>Untrusted Apps Policy = <code>ALLOW_INSTALL_DEVICE_WIDE<\/code><\/li><\/ul><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-98c6f51 elementor-widget elementor-widget-code-highlight\" data-id=\"98c6f51\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>{\n  \"config\": {\n    \"applications\": [...],\n    \"advancedSecurityOverrides\": {\n      \"untrustedAppsPolicy\": \"ALLOW_INSTALL_DEVICE_WIDE\"\n    }\n  }\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c2868c7 elementor-widget elementor-widget-heading\" data-id=\"c2868c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Allow to install unknown apps<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-abb8311 elementor-widget elementor-widget-text-editor\" data-id=\"abb8311\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Sometimes you will need to allow users to grant specific apps permission to install other apps (<code>.apk<\/code> files) on their device. <strong>This is different from the Unknown Sources setting<\/strong>, which allows the installation of apps from sources other than the Google Play Store.<\/p><p>This feature provides more granular control over which apps can install other apps on your Android device. It is often used for apps like file managers or web browsers that may need to download and install <code>.apk<\/code> files.<\/p><p>Remember that allowing apps to install unknown apps can pose a security risk, opening the door for potentially harmful or unverified apps to be installed on your device.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-646af51 elementor-widget elementor-widget-code-highlight\" data-id=\"646af51\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>{\n  \"installUnknownSourcesAllowed\": true,\n  \"advancedSecurityOverrides\": {\n    \"untrustedAppsPolicy\": \"ALLOW_INSTALL_DEVICE_WIDE\",\n    \"developerSettings\": \"DEVELOPER_SETTINGS_ALLOWED\"\n  }\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3ab7270 elementor-widget elementor-widget-heading\" data-id=\"3ab7270\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Network configuration<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ba28021 elementor-widget elementor-widget-text-editor\" data-id=\"ba28021\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Sometimes you will need to remotely deploy network configuration, including WiFi and others. This is something that can be done by using the <strong>Open Network Configuration<\/strong> property, which supports deploying multiple configurations at the same time using the <a href=\"https:\/\/chromium.googlesource.com\/chromium\/src\/+\/main\/components\/onc\/docs\/onc_spec.md\">ONC standard<\/a>.<\/p><p>The most common properties are:<\/p><ul><li><strong>GUID:<\/strong> unique identifier for this network.<\/li><li><strong>Name:<\/strong> friendly network name<\/li><li><strong>Type:<\/strong> type of network. Allowed values are:\u00a0<code>VPN<\/code>, <code>WiFi<\/code>, <code>Tether<\/code>, <code>Ethernet<\/code>, <code>Cellular<\/code><\/li><li><strong>Security:<\/strong> Security type. Allowed values are: <code>WEP-PSK<\/code>, <code>WEP-8021X<\/code>, <code>WPA-PSK<\/code>, <code>WPA-EAP<\/code><\/li><li><strong>AutoConnect: <\/strong>Indicating that the network should be connected to automatically when possible <code>true<\/code> or <code>false<\/code><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-414caa5 elementor-widget elementor-widget-image\" data-id=\"414caa5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"302\" src=\"https:\/\/www.applivery.com\/wp-content\/uploads\/2021\/12\/OpenNetworkConfiguration-1024x387.png\" class=\"attachment-large size-large wp-image-13490\" alt=\"\" srcset=\"https:\/\/www.applivery.com\/wp-content\/uploads\/2021\/12\/OpenNetworkConfiguration-1024x387.png 1024w, https:\/\/www.applivery.com\/wp-content\/uploads\/2021\/12\/OpenNetworkConfiguration-300x113.png 300w, https:\/\/www.applivery.com\/wp-content\/uploads\/2021\/12\/OpenNetworkConfiguration-768x290.png 768w, https:\/\/www.applivery.com\/wp-content\/uploads\/2021\/12\/OpenNetworkConfiguration-1536x580.png 1536w, https:\/\/www.applivery.com\/wp-content\/uploads\/2021\/12\/OpenNetworkConfiguration.png 1870w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" title=\"OpenNetworkConfiguration | Applivery\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f321243 elementor-widget elementor-widget-code-highlight\" data-id=\"f321243\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>{\n  \"NetworkConfigurations\": [{\n    \"GUID\": \"a\",\n    \"Name\": \"Example A\",\n    \"Type\": \"WiFi\",\n    \"WiFi\": {\n      \"SSID\": \"Example A\",\n      \"Security\": \"None\",\n      \"AutoConnect\": true\n    }\n  }, {\n    \"GUID\": \"b\",\n    \"Name\": \"Example B\",\n    \"Type\": \"WiFi\",\n    \"WiFi\": {\n      \"SSID\": \"Example B\",\n      \"Security\": \"WEP-PSK\",\n      \"Passphrase\": \"1234567890\"\n    }\n  }, {\n    \"GUID\": \"c\",\n    \"Name\": \"Example C\",\n    \"Type\": \"WiFi\",\n    \"WiFi\": {\n      \"SSID\": \"Example C\",\n      \"Security\": \"WPA-PSK\",\n      \"Passphrase\": \"baseball\"\n    }\n  }]\n}<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-32461a2 elementor-widget elementor-widget-text-editor\" data-id=\"32461a2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>You can read more about <a style=\"text-decoration: underline;\" href=\"https:\/\/chromium.googlesource.com\/chromium\/src\/+\/main\/components\/onc\/docs\/onc_spec.md\">Open Network Configuration specs here<\/a>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Get inspired with these highly requested sample policies for the most common Android Management features such as kiosk mode, custom launcher or unknown sources<\/p>\n","protected":false},"author":1,"featured_media":32390,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"content-type":"","inline_featured_image":false,"footnotes":""},"product":[312],"doc_category":[314],"doc_tag":[],"class_list":["post-9711","docs","type-docs","status-publish","format-standard","has-post-thumbnail","hentry","product-android-mdm","doc_category-policies"],"aioseo_notices":[],"year_month":"2026-04","word_count":906,"total_views":"3110","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"applivery","author_nicename":"applivery","author_url":"https:\/\/www.applivery.com\/pt-br\/blog\/author\/applivery\/"},"doc_category_info":[{"term_name":"Policies","term_url":"https:\/\/www.applivery.com\/docs\/mobile-device-management\/android-mdm\/policies\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/9711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/comments?post=9711"}],"version-history":[{"count":4,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/9711\/revisions"}],"predecessor-version":[{"id":43061,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/9711\/revisions\/43061"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/media\/32390"}],"wp:attachment":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/media?parent=9711"}],"wp:term":[{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/product?post=9711"},{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/doc_category?post=9711"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/doc_tag?post=9711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}