-1

Possible Duplicate:
Kiosk mode in Android

I want to lock my android device so the users of it can only use my app , how can I do that ?

Community
  • 1
  • 1

2 Answers2

1

Create a custom launcher...

<activity
 android:label="@string/app_name"
 android:name=".ClassNameOfYourLauncher">
    <intent-filter >
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <intent-filter >
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.HOME" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

Hopefully, the user will need to accept before you can lock the device

Waza_Be
  • 39,407
  • 49
  • 186
  • 260
0

This is probably not something you want to do. Furthermore, what exactly do you mean: you want to disable the home button and back button? You want to brick their phone? You want to temporarily lock them in while something loads for security?

Please clarify your question, but I can tell you one thing: The answer to your question as you've posed is: DON'T.

EDIT: Android - Is It possible to disable the click of home button

Partial answer to the question, along with a thousand reasons not to implement this.

Community
  • 1
  • 1
Caerulius
  • 425
  • 4
  • 21
  • I mean when the user run my program he cannot close it or use other programs – Mohammed Subhi Sheikh Quroush Jan 28 '13 at 18:15
  • http://stackoverflow.com/questions/2162182/android-is-it-possible-to-disable-the-click-of-home-button Look at this, but at the same time, PLEASE look at all the comments that are saying "don't do this." Also this solution stops working in ICS, as noted in the comments. – Caerulius Jan 28 '13 at 18:16