- Home /
Question is off-topic or not relevant
How to lock the user inside an android app
Hi, I'm working on a game, and one of the requirements is that the user should not be able to exit the app when it's running. All hardware buttons (excluding volume) should be disabled and the only way to exit the app would be by entering an admin code.
Something like the "guided access" accessibility feature on iOS.
I know there are some third party apps that do this like "SureLock" but I was wondering if there was a way to do it myself and save my client some money (he would need to pay licensing for 50 devices otherwise => 1000 $)
How is this not a Unity related question. I make a game in Unity, and I want, somehow, by code to do this inside Unity
Closing this question, and marking it "off-topic" is totally unfair. I understand that perhaps, I can't SOLVE my problem inside unity. But then you could just say "there's no way to do this in Unity" ins$$anonymous$$d of giving me the ban hammer
I get your dilemma but UA isnt for saving people pennies :P
You are going to have to do your own research on this one but I will say that what you describe goes against Android intended usage philosophies. Users must have the ability to ter$$anonymous$$ate an app immediately. If this is an app for private usage there will not be a problem but I speculate that you will not be able to submit something like this to any stores.
To configure the hardware buttons you will need native API access.
Yeah there's absolutely no intention on releasing this on the store. It's for a museum, to make an interactive guided tour.
You will likely need Android ND$$anonymous$$ and develop externally in Eclipse/Android Studio.
$$anonymous$$y immediate thought is that this is easiest to implement as a Lock-Screen type app. I'm not sure how easy this is to do in Unity, however.
After a little searching around the term you need for your searches is "$$anonymous$$iosk $$anonymous$$ode".
http://stackoverflow.com/questions/2068084/kiosk-mode-in-android
Dont be hard on Dave, he's doing his job as a moderator (and doing it well). This is a forum type question, here on UA we mostly deal with the specifics of Editor and Coding.