ImGenie
ImGenie

Reputation: 323

How to create a single purpose android app for samsung tabs

How can develop a single purpose android app for a Samsung tab which has android lollipop(5.0.2) running on it. Do I need to use any Samsung SDK or in the standard android framework itself provides some methods to achieve this?

i.e., User cannot access any other apps. My app has to take whole control of the device. It cannot be exited.

Upvotes: 0

Views: 251

Answers (1)

Pragnesh Ghoda  シ
Pragnesh Ghoda シ

Reputation: 8337

There are several ways to do that. Though I am not sure which suits you best for the application you want to create.

  1. Create Single Purpose App which is mentioned in below link.

https://developer.android.com/work/cosu.html

  1. Make your application as launcher app and set it default. So every time user clicks on home button it will launch your application.

    <activity
        android:name=".ui.list.MainActivity"
        android:label="@string/app_name"
        android:launchMode="singleTop"
        android:theme="@style/AppTheme.Forecast">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    

Add <category android:name="android.intent.category.LAUNCHER"/> in Intent-Filter of your main screen. So when you press home button it will ask user to launch app.

There will be 2 options. One is default launcher and another is your application. Once you set your application as default launcher user can access only this app.

It is very helpful for small purpose applications. We have used this in our company's tablets and it is working fine.

P.S. : User can change default app setting from the settings menu which can be open from the top menu screen.

Upvotes: 1

Related Questions