1

The question I'm about to ask may seem dangerous for the user, so here's the story before the question: I'm working in a compagny that tries to sell Galaxy Tabs to schools (children under 10). So, I've been asked to develop an application that starts on boot showing a login screen. The child HAS to log in before he's allowed to use the tablet (just like logging in a computer). My application starts on boot, shows the login screen, all buttons are blocked (the kid must not be able to use the tablet before the application lets him) except the home button. fortunately, it seems impossible to block the home button. I've been trying to rebring the application to front when onpause/onstop is called, this kind of hacks.

So my question is : Can I prevent an user to quit my application until I let him do so?

I know this sounds like a virus, I'm not really happy to be looking for this kind of solution either.

nwalke
  • 3,170
  • 6
  • 35
  • 60
Setsuki
  • 255
  • 2
  • 11
  • I think of the "impossible to block home button" as an awesome *feature* (it has so far saved me from several crapps that were impossible to exit otherwise). – Piskvor left the building May 18 '11 at 14:47
  • I agree, I never said it was bad, and now that I'm trying to block it I see how great this feature is. – Setsuki May 18 '11 at 15:06
  • possible duplicate of [How can I create a custom home-screen replacement application for Android?](http://stackoverflow.com/questions/3666771/how-can-i-create-a-custom-home-screen-replacement-application-for-android) – john.k.doe Mar 31 '13 at 01:35

1 Answers1

2

You have to build a custom Home screen, and then set it as the default Home application.

EDIT: see more on this previously asked question (at How can I create a custom home-screen replacement application for Android?). You can just make your authorization the default Home application, then when they log in it forwards to the regular Home screen. If they hit the home button your app gets called, can check if they have logged in and if they have will just send them to the regular home screen.

Community
  • 1
  • 1
Femi
  • 64,273
  • 8
  • 118
  • 148
  • This will only work if the student in question does not know how to factory reset the device or boot in safe mode. To get around that problem, this application would have to be installed in firmware. – CommonsWare May 18 '11 at 15:07
  • Thanks CommonsWare, but the Tabs are owned by the school, given to the children when they need it, and they mostly have fun putting liveWallpapers instead of factory reseting it. – Setsuki May 18 '11 at 15:17