0

Is there a way to make my app the only running app in a device, what I mean is the only visible and open app? Once the device booted, the app will launch automatically while any tap to settings at status bar, back, home and recent apps button are disabled. Probably a custom Android OS is required or rooting the device will be enough? We plan to have a set of devices where users can only operate with one app. Thanks

Bitwise DEVS
  • 2,858
  • 4
  • 24
  • 67

1 Answers1

2

You need to be able to remove current launcher app to the system part of the device.

Then it's as simple as:

  • Adding android:launchMode="singleTask" to activity tag in AndroidManifest.xml
  • Adding <category android:name="android.intent.category.DEFAULT" /> and <category android:name="android.intent.category.HOME" /> to your intent filter

The end result should look similar to this:

<application
            android:allowBackup="true"
            android:icon="@drawable/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
    <activity
                android:name="com.example.app.MainActivity"
                android:launchMode="singleTask"
                android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.HOME" />
        </intent-filter>
    </activity>
</application>
Lukáš Anda
  • 560
  • 1
  • 5
  • 23