Reputation: 323
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
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.
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