1

Possible Duplicate:
Is it possible to configure an Android install to run a single app?

So, basically, I'm currently working on an android application that is intended for use on dedicated tablets inside of classsrooms. While using this app, we don't want the students to back out and go messing around, ignoring what they're supposed to be doing. Is there a way to:

a) Have an app launch on startup, so there's no initial access to the home screen b) Lock the app so it can't be backed out of, and will be the only thing to run

Community
  • 1
  • 1
Card
  • 53
  • 5
  • You could make your app the launcher app, so it gets automatically started when pressing the home button. But that wouldn't prevent your students from changing that back to the default launcher in the settings. I'm not sure what you can do against that on a rooted device. I think that your safest bet would be customizing the firmware. – tiguchi Jul 25 '12 at 17:16

2 Answers2

0

The only way to achieve what you're looking for is:

  1. Modify Android at the firmware level
  2. Make your app the homescreen replacement.

Option 2 is considerably easier. Basically, you tell Android that your app is the replacement home screen, and then set it as the default on each device. That way, whenever the device is unlocked, your app will be shown, and pressing the home button will only launch your app. This essentially stops the device from opening up any other apps, unless it is done via notifications, which you can take away by making your app full screen. The only possibility left to leave your app now is via recent apps, or a service that launched apps on a device shake or something. You can get around this by making sure that no other app was launched prior to yours, or clearing the recent apps manually. The service can be gotten around by simple not installing any app that does that.

You can look into the default home screen app, which is open source and available at:

https://android.googlesource.com/platform/packages/apps/Launcher2.git
Raghav Sood
  • 81,899
  • 22
  • 187
  • 195
0

I've done a fair amount of research on this and the options are not pretty:

1) Write your own Android home screen

This one is involved but seems doable. Theoretically you could choose to write a home screen that only includes a link to your app and doesn't allow any other icons.

Try this link

2) Create you own lock screen

This may give you more control over the device, but the only options historically have been to use unpublished APIs that have been now been changed to disallow this.

Community
  • 1
  • 1
Mike Marshall
  • 7,788
  • 4
  • 39
  • 63