<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>App - Inero Software - Software Consulting</title>
	<atom:link href="https://inero-software.com/tag/app/feed/" rel="self" type="application/rss+xml" />
	<link>https://inero-software.com/tag/app/</link>
	<description>We unleash innovations using cutting-edge technologies, modern design and AI</description>
	<lastBuildDate>Fri, 25 Mar 2022 12:43:24 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://inero-software.com/wp-content/uploads/2018/11/inero-logo-favicon.png</url>
	<title>App - Inero Software - Software Consulting</title>
	<link>https://inero-software.com/tag/app/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">153509928</site>	<item>
		<title>Android Kiosk Mode &#8211; how to turn an Android device into a single-use device</title>
		<link>https://inero-software.com/android-kiosk-mode-how-to-turn-an-android-device-into-a-single-use-device/</link>
		
		<dc:creator><![CDATA[Andrzej Chybicki]]></dc:creator>
		<pubDate>Thu, 18 Mar 2021 11:36:35 +0000</pubDate>
				<category><![CDATA[Company]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[corporate]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[single use device]]></category>
		<guid isPermaLink="false">https://sandbox-www.devel.inero.com.pl/?p=3353</guid>

					<description><![CDATA[<p>In Inero Software – software development agency, we are experts of digital transformation and smart automation. We provide knowledge and expertise on how to successfully use cutting edge technologies and data to shape corporate digital products of the future. Find out more visiting our website or contacting us directly on&#8230;</p>
<p>Artykuł <a href="https://inero-software.com/android-kiosk-mode-how-to-turn-an-android-device-into-a-single-use-device/">Android Kiosk Mode &#8211; how to turn an Android device into a single-use device</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="row"><div class="col-sm-1"></div><div class="col-sm-10">
<p><img decoding="async" data-attachment-id="2770" data-permalink="https://inero-software.com/data-the-playground-of-machine-learning/inero-glify-10-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Inero Software" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" tabindex="0" role="button" class="aligncenter wp-image-2770 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png" alt="Separating icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></p>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2873" data-permalink="https://inero-software.com/digital-twins-a-dynamic-software-model-of-reality/inero-glify-08-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="inero-glyph" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" tabindex="0" role="button" class="alignleft wp-image-2873 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png" alt="Paragraph icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></span></p>
<p><span style="font-weight: 400;">I believe that the Android OS needs no introduction. It is currently the most popular smartphone operating system. However, the days when Android was only used in consumer electronics are behind us. Today we can meet Android devices at every step. It is increasingly used in industries such as security, automation, logistics, sales, hospitality, etc. </span><span style="font-weight: 400;">Due to its ease of use, flexibility, level of customization and lower cost, Android devices are the choice of many enterprises and organizations. However, for many companies Android systems are not considered safe enough for use in the workplace or like all mobile devices are too distracting. </span><span style="font-weight: 400;">One of the best solutions to the above problems is the Kiosk Mode tool, which allows us to convert your Android device into a dedicated app, while providing additional security and reducing additional distractions. Enjoy your reading!</span></p>
<p><img decoding="async" data-attachment-id="2770" data-permalink="https://inero-software.com/data-the-playground-of-machine-learning/inero-glify-10-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Inero Software" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" tabindex="0" role="button" class="aligncenter wp-image-2770 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png" alt="Separating icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></p>
<h2><span style="color: #800080;"><b>COSU &#8211; corporate-owned single use device</b></span></h2>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2873" data-permalink="https://inero-software.com/digital-twins-a-dynamic-software-model-of-reality/inero-glify-08-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="inero-glyph" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" tabindex="0" role="button" class="alignleft wp-image-2873 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png" alt="Paragraph icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png 208w" sizes="(max-width: 80px) 100vw, 80px" />Dedicated devices (formerly called corporate-owned single-use, or COSU) are fully managed devices that serve a specific purpose. Thanks to this, it is possible to maximize the use of the device, while limiting use of personal and non-supervised functions like telephony, messaging etc. We deal with many such devices every day. These include vending machines, automatic ticket printers, parking meters or interactive information boards in shopping malls. COSU allows IT administrators to remotely control all these devices and can lock the device for a specific application. This prevents users from using other applications or performing other activities on these devices.</span></p>
<p><img decoding="async" data-attachment-id="2770" data-permalink="https://inero-software.com/data-the-playground-of-machine-learning/inero-glify-10-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Inero Software" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" tabindex="0" role="button" class="aligncenter wp-image-2770 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png" alt="Separating icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></p>
<h2><span style="color: #800080;"><b>Kiosk Mode</b></span></h2>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2873" data-permalink="https://inero-software.com/digital-twins-a-dynamic-software-model-of-reality/inero-glify-08-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="inero-glyph" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" tabindex="0" role="button" class="alignleft wp-image-2873 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png" alt="Paragraph icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></span></p>
<p><span style="font-weight: 400;">Kiosk mode allows to turn Android devices into single-use devices by running only one application or a specific set of applications. Starting with Android 5.0 Lollipop, the system offers two ways to lock the device for a specific purpose:</span></p>
<p>&nbsp;</p>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">App pinning &#8211; Using the app pinning feature, users can temporarily pin any installed app on the screen. The navigation buttons (Home and Recent apps) are visible but inactive. The user can exit this mode by holding down the Home and Recent apps buttons simultaneously.</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">Lock task mode &#8211; This is an even more effective way to switch your Android device into a single-purpose kiosk. Only applications whitelisted by the Device Policy Controller (DPC) may be blocked. The navigation buttons (Home and Recent apps) are hidden. Exiting this mode is done by calling the stopLockTask() method. This mode is available to only device owner devices.</span></li>
</ul>
<p><span style="font-weight: 400;">Running the application in Kiosk Mode gives us a number of benefits:</span></p>
<ul>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">device acts as a single application platform,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">hidden navigation buttons (Lock task mode),</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">inactive status bar,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">automatic app startup with system startup,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">disabled notifications,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">blocked incoming calls,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">inactive transition to settings,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">working in full screen mode.</span></li>
</ul>
<p><img decoding="async" data-attachment-id="2770" data-permalink="https://inero-software.com/data-the-playground-of-machine-learning/inero-glify-10-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Inero Software" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" tabindex="0" role="button" class="aligncenter wp-image-2770 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png" alt="Separating icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></p>
<h2><span style="color: #800080;"><b>How to enable Android Kiosk Mode?</b></span></h2>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2873" data-permalink="https://inero-software.com/digital-twins-a-dynamic-software-model-of-reality/inero-glify-08-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="inero-glyph" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" tabindex="0" role="button" class="alignleft wp-image-2873 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png" alt="Paragraph icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></span></p>
<p>&nbsp;</p>
<p><span style="font-weight: 400;">The first step is to implement the class inheriting from the DeviceAdminReceiver class:</span></p>
<p>&nbsp;</p>
<pre><span style="font-weight: 400;">class MyDeviceAdminReceiver : DeviceAdminReceiver() {</span>
<span style="font-weight: 400;">    companion object {</span>
<span style="font-weight: 400;">        fun getComponentName(context: Context): ComponentName {</span>
<span style="font-weight: 400;">            return ComponentName(context.applicationContext, MyDeviceAdminReceiver::class.java)</span>
<span style="font-weight: 400;">        }</span>
<span style="font-weight: 400;">    }</span>
<span style="font-weight: 400;">}</span></pre>
<p><span style="font-weight: 400;">DeviceAdminReceiver is a </span><span style="font-weight: 400;">class which provides a convenience for interpreting the raw intent actions that are sent by the system.</span></p>
<p><span style="font-weight: 400;">Then we have to inform the system that our application wants to become the device administrator. We can do this by adding a receiver in the AndroidManifest.xml file:</span></p>
<pre><span style="font-weight: 400;">&lt;application&gt;</span>
<span style="font-weight: 400;">          ...</span>
<span style="font-weight: 400;">      &lt;receiver</span>
<span style="font-weight: 400;">            android:name=".MyDeviceAdminReceiver"</span>
<span style="font-weight: 400;">            android:description="@string/app_desc"</span>
<span style="font-weight: 400;">            android:label="@string/app_name"</span>
<span style="font-weight: 400;">            android:permission="android.permission.BIND_DEVICE_ADMIN"&gt;</span>
<span style="font-weight: 400;">            &lt;meta-data</span>
<span style="font-weight: 400;">                android:name="android.app.device_admin" /&gt;</span>
<span style="font-weight: 400;">            &lt;intent-filter&gt;</span>
<span style="font-weight: 400;">                &lt;action android:name="android.app.action.DEVICE_ADMIN_ENABLED" /&gt;</span>
<span style="font-weight: 400;">            &lt;/intent-filter&gt;</span>
<span style="font-weight: 400;">        &lt;/receiver&gt;</span>
<span style="font-weight: 400;">    &lt;/application&gt;</span></pre>
<p><span style="font-weight: 400;">At this point, we can proceed to the installation of the application. Note that, in order to grant administration rights to the app, you must remove all existing users.  The easiest way is to apply a factory reset your device. It is important not to add a Google account to the device during the first start-up after the reset. List of steps for correct configuration is as follows:</span></p>
<ol>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">factory reset on your mobile device,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">skip the steps related to adding a Google account,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">enable the developer mode and USB debugging on the mobile device,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">install adb (Android Device Bridge) on your computer &#8211; it is automatically installed with the Android Studio environment,</span></li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">install the application on a mobile device using Android Studio or by entering the following commands in the console: </span><span style="font-weight: 400;"> </span>
<ol>
<li style="font-weight: 400;" aria-level="1">
<pre>adb install path / to / kiosk / application.apk</pre>
</li>
</ol>
</li>
<li style="font-weight: 400;" aria-level="1"><span style="font-weight: 400;">grant the application device administrator privileges:</span>
<ol>
<li style="font-weight: 400;" aria-level="2">
<pre><span style="font-weight: 400;">adb shell dpm set-device-owner pl.inero.deliverM8 / .MyDeviceAdminReceiver</span></pre>
</li>
</ol>
</li>
</ol>
<p><span style="font-weight: 400;">Use the following code snippet to verify that the granting process was successful:</span></p>
<pre><span style="font-weight: 400;">override fun onCreate(savedInstanceState: Bundle?) {</span>
<span style="font-weight: 400;">        super.onCreate(savedInstanceState)</span>
<span style="font-weight: 400;">        mDevicePolicyManager = getSystemService(Context.DEVICE_POLICY_SERVICE) as DevicePolicyManager</span>
<span style="font-weight: 400;">        val isAdmin = mDevicePolicyManager.isDeviceOwnerApp(packageName)</span>
<span style="font-weight: 400;">        if (isAdmin) {</span>
<span style="font-weight: 400;">            println("You are an admin")</span>
<span style="font-weight: 400;">        } else {</span>
<span style="font-weight: 400;">            println("You are not an admin")</span>
<span style="font-weight: 400;">        }</span>
<span style="font-weight: 400;">    }</span></pre>
<p><span style="font-weight: 400;">Depending on the needs, we can enable the user to disable the Kiosk mode via the interface (e.g. by confirming with a password) or completely block the exit from the application. With the help of the code snippets below, I will try to explain how you can control the device settings to get the solution that best suits your needs.</span></p>
<p><span style="font-weight: 400;">One of the parameters we can control is whether we keep the device on while the device is plugged in. “0” means  to never stay on while plugged in.</span></p>
<pre><span style="font-weight: 400;">private fun enableStayOnWhilePluggedIn(active: Boolean) = if (active) {</span>
<span style="font-weight: 400;">        mDevicePolicyManager.setGlobalSetting(mAdminComponentName,</span>
<span style="font-weight: 400;">                Settings.Global.STAY_ON_WHILE_PLUGGED_IN,</span>
<span style="font-weight: 400;">                (BatteryManager.BATTERY_PLUGGED_AC</span>
<span style="font-weight: 400;">                        or BatteryManager.BATTERY_PLUGGED_USB</span>
<span style="font-weight: 400;">                        or BatteryManager.BATTERY_PLUGGED_WIRELESS).toString())</span>
<span style="font-weight: 400;">    } else {</span>
<span style="font-weight: 400;">        mDevicePolicyManager.setGlobalSetting(mAdminComponentName, Settings.Global.STAY_ON_WHILE_PLUGGED_IN, "0")</span>
<span style="font-weight: 400;">    }</span></pre>
<p><span style="font-weight: 400;">If we want to impose restrictions on the user, we can use the method </span><span style="font-weight: 400;">addUserRestriction(ComponentName admin, String key). The device user must have device administrator rights or a security exception will be thrown. This method can be called on an instance of DevicePolicyManager.</span></p>
<pre><span style="font-weight: 400;">mDevicePolicyManager = getSystemService (Context.DEVICE_POLICY_SERVICE) as DevicePolicyManager</span></pre>
<p><span style="font-weight: 400;">In our case, we have blocked the user from factory reset, adding new users, connecting external media, controlling the device volume and turning off the bar status:</span></p>
<pre><span style="font-weight: 400;">private fun setRestrictions(disallow: Boolean) {</span>
<span style="font-weight: 400;">        setUserRestriction(UserManager.DISALLOW_FACTORY_RESET, disallow)</span>
<span style="font-weight: 400;">        setUserRestriction(UserManager.DISALLOW_ADD_USER, disallow)</span>
<span style="font-weight: 400;">        setUserRestriction(UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA, disallow)</span>
<span style="font-weight: 400;">        setUserRestriction(UserManager.DISALLOW_ADJUST_VOLUME, disallow)</span>
<span style="font-weight: 400;">        mDevicePolicyManager.setStatusBarDisabled(mAdminComponentName, disallow)</span>
<span style="font-weight: 400;">    }
</span><span style="font-weight: 400;">private fun setUserRestriction(restriction: String, disallow: Boolean) = if (disallow) {</span>
<span style="font-weight: 400;">        mDevicePolicyManager.addUserRestriction(mAdminComponentName, restriction)</span>
<span style="font-weight: 400;">    } else {</span>
<span style="font-weight: 400;">        mDevicePolicyManager.clearUserRestriction(mAdminComponentName, restriction)</span>
<span style="font-weight: 400;">    }</span></pre>
<p><span style="font-weight: 400;">If we want our application to start with the system startup, then we have to add the appropriate filters:</span></p>
<pre><span style="font-weight: 400;">private fun setAsHomeApp(enable: Boolean) {</span>
<span style="font-weight: 400;">        if (enable) {</span>
<span style="font-weight: 400;">            val intentFilter = IntentFilter(Intent.ACTION_MAIN).apply {</span>
<span style="font-weight: 400;">                addCategory(Intent.CATEGORY_HOME)</span>
<span style="font-weight: 400;">                addCategory(Intent.CATEGORY_DEFAULT)</span>
<span style="font-weight: 400;">            }</span>
<span style="font-weight: 400;">            mDevicePolicyManager.addPersistentPreferredActivity(</span>
<span style="font-weight: 400;">                    mAdminComponentName, intentFilter, ComponentName(packageName, MainActivity::class.java.name))</span>
<span style="font-weight: 400;">        } else {</span>
<span style="font-weight: 400;">            mDevicePolicyManager.clearPackagePersistentPreferredActivities(</span>
<span style="font-weight: 400;">                    mAdminComponentName, packageName)</span>
<span style="font-weight: 400;">        }</span>
<span style="font-weight: 400;">    }</span></pre>
<p><span style="font-weight: 400;">In order to run the application in full screen screen Kiosk Mode , the appropriate flags must be added:</span></p>
<pre><span style="font-weight: 400;">private fun setImmersiveMode(enable: Boolean) {</span>
<span style="font-weight: 400;">        if (enable) {</span>
<span style="font-weight: 400;">            val flags = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE</span>
<span style="font-weight: 400;">                    or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION</span>
<span style="font-weight: 400;">                    or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN</span>
<span style="font-weight: 400;">                    or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION</span>
<span style="font-weight: 400;">                    or View.SYSTEM_UI_FLAG_FULLSCREEN</span>
<span style="font-weight: 400;">                    or View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY</span>
<span style="font-weight: 400;">                    )</span>
<span style="font-weight: 400;">            window.decorView.systemUiVisibility = flags</span>
<span style="font-weight: 400;">            window.decorView.setOnSystemUiVisibilityChangeListener {</span>
<span style="font-weight: 400;">                window.decorView.systemUiVisibility = flags;</span>
<span style="font-weight: 400;">            }</span>
<span style="font-weight: 400;">        } else {</span>
<span style="font-weight: 400;">            val flags = (View.SYSTEM_UI_FLAG_LAYOUT_STABLE</span>
<span style="font-weight: 400;">                    or View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION</span>
<span style="font-weight: 400;">                    or View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)</span>
<span style="font-weight: 400;">            window.decorView.systemUiVisibility = flags</span>
<span style="font-weight: 400;">        }</span>
<span style="font-weight: 400;">    }</span></pre>
<p><span style="font-weight: 400;">Finally, we use the startLockTask () and stopLockTask () methods to turn Lock task mode on / off:</span></p>
<pre><span style="font-weight: 400;">private fun setLockTask(start: Boolean, isAdmin: Boolean) {</span>
<span style="font-weight: 400;">        if (isAdmin) {</span>
<span style="font-weight: 400;">            mDevicePolicyManager.setLockTaskPackages(</span>
<span style="font-weight: 400;">                    mAdminComponentName, if (start) arrayOf(packageName) else arrayOf())</span>
<span style="font-weight: 400;">        }</span>
<span style="font-weight: 400;">        if (start) {</span>
<span style="font-weight: 400;">            startLockTask()</span>
<span style="font-weight: 400;">        } else {</span>
<span style="font-weight: 400;">            stopLockTask()</span>
<span style="font-weight: 400;">        }</span>
<span style="font-weight: 400;">    }</span></pre>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2770" data-permalink="https://inero-software.com/data-the-playground-of-machine-learning/inero-glify-10-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Inero Software" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" tabindex="0" role="button" class="aligncenter wp-image-2770 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png" alt="Separating icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></span></p>
<h2><span style="color: #800080;"><b>Results</b></span></h2>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2873" data-permalink="https://inero-software.com/digital-twins-a-dynamic-software-model-of-reality/inero-glify-08-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="inero-glyph" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" tabindex="0" role="button" class="alignleft wp-image-2873 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png" alt="Paragraph icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png 208w" sizes="(max-width: 80px) 100vw, 80px" />The above operations allow to change the Android device into a dedicated device, operating in full screen mode and preventing the user from using other functionalities. For the purpose of exemplification of our case, we used a mobile application, developed in our company for <a href="https://inero-software.com/supply-chain-management/">supply chain management</a>. This application is a part of <a href="https://deliverm8.com/">DeliverM8</a> platform, we developed in order to optimize and plan supply chain management tasks for the <a href="https://inero-software.com/deliverm8-last-mile-delivery/">last mile delivery</a>. You can read more about it <a href="https://deliverm8.com/">here</a>. Coming back to the topic of the blogpost, the final  effect is as follows:</span></p>
<p><img fetchpriority="high" decoding="async" data-attachment-id="3356" data-permalink="https://inero-software.com/android-kiosk-mode-how-to-turn-an-android-device-into-a-single-use-device/deliverm8-kiosk/" data-orig-file="https://inero-software.com/wp-content/uploads/2021/03/deliverM8-kiosk.png" data-orig-size="441,864" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="deliverM8-kiosk" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2021/03/deliverM8-kiosk-153x300.png" data-large-file="https://inero-software.com/wp-content/uploads/2021/03/deliverM8-kiosk.png" tabindex="0" role="button" class="aligncenter wp-image-3356 size-full" src="https://inero-software.com/wp-content/uploads/2021/03/deliverM8-kiosk.png" alt="Android Kiosk Mode visualisation" width="441" height="864" srcset="https://inero-software.com/wp-content/uploads/2021/03/deliverM8-kiosk.png 441w, https://inero-software.com/wp-content/uploads/2021/03/deliverM8-kiosk-153x300.png 153w" sizes="(max-width: 441px) 100vw, 441px" /></p>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2770" data-permalink="https://inero-software.com/data-the-playground-of-machine-learning/inero-glify-10-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Inero Software" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png" tabindex="0" role="button" class="aligncenter wp-image-2770 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png" alt="Separating icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/05/inero-glify-10.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></span></p>
<h2><span style="color: #800080;"><b>Summary</b></span></h2>
<p><span style="font-weight: 400;"><img decoding="async" data-attachment-id="2873" data-permalink="https://inero-software.com/digital-twins-a-dynamic-software-model-of-reality/inero-glify-08-2/" data-orig-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-orig-size="208,208" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="inero-glyph" data-image-description="" data-image-caption="" data-medium-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" data-large-file="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png" tabindex="0" role="button" class="alignleft wp-image-2873 size-thumbnail" src="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png" alt="Paragraph icon" width="80" height="80" srcset="https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-80x80.png 80w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08-50x50.png 50w, https://inero-software.com/wp-content/uploads/2019/10/inero-glify-08.png 208w" sizes="(max-width: 80px) 100vw, 80px" /></span></p>
<p><span style="font-weight: 400;">In this blog post we showed how to quickly set up a configuration of a mobile application to get a single purpose device that meets our needs as much as possible. The use of the Kiosk Mode brings many benefits, such as increasing security or limiting access to undesirable functionalities, creating a solution tailored both to the needs of employees (inventory management, field service management, <a href="https://inero-software.com/logistics-solutions/">transport and logistics</a>) and customers (hospitality check-in, self-service kiosks).<br />
</span></p>
<p></p></div><div class="col-sm-1"></div></div>
<h4><b>In <a href="https://inero-software.com">Inero Software</a> – software development agency, we are experts of digital transformation and smart automation. We provide knowledge and expertise on how to successfully use cutting edge technologies and data to shape corporate digital products of the future. Find out more visiting our website or contacting us directly on <a href="mailto:hi@inero-software.com">hi@inero-software.com</a></b></h4>
<p>Artykuł <a href="https://inero-software.com/android-kiosk-mode-how-to-turn-an-android-device-into-a-single-use-device/">Android Kiosk Mode &#8211; how to turn an Android device into a single-use device</a> pochodzi z serwisu <a href="https://inero-software.com">Inero Software - Software Consulting</a>.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3353</post-id>	</item>
	</channel>
</rss>
