0

I'm developing an android application for my customer. And in that, the User needs to work with that application only. The User should not use any other applications in the Tablet, and my application need to be the default application after i installed the application...

If i shutdown the Tablet my application will be stoped, and if i switch on the tablet means my application will be automatically started.

could i achieve this, any steps to achieve for it..

Help me to fix this, Thanks in Advance

gowri
  • 681
  • 9
  • 27

2 Answers2

2

you can start your application while boot is completed using broadcaste but you cant stop the app getting exit while user pressed home button.

Sandeep P
  • 4,291
  • 2
  • 26
  • 45
  • http://stackoverflow.com/questions/8277207/how-to-catch-the-system-broadcast-boot-completed-my-program-just-doesnt-work/8278074#8278074 – Sandeep P Nov 29 '12 at 07:22
2

You may define your activity as Home, in the manifest file, define as below:

    <activity android:name=".YouClassName">
        <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>

This way, after install you application, when user long tap the Home button, Android would prompt use to choose which HOME to enter, one is the system default, the other is your activity. At this time, user may also set your activity as default HOME, then when power on, system enter your activity automatically.

If you permission to delete system default launcher (the default home), then your activity becomes to be the unique home.

TieDad
  • 9,143
  • 5
  • 32
  • 58