Reputation: 678
I'm currently programming an Android Application running on a tablet (I didn't buy the tablet yet, I'm testing on phone). Since it will be on a shop on free access, I don't want people to use it to browse internet or play, only to stick on the application I'm designing.
So :
is it possible to disable the "Home" button ?
is it possible to disable the "swipe from top to show options and notifications" ?
I know this is multiple questions but the goal remain the same : make a tablet to run only one application.
How do I proceed ? is it even possible ? Should I buy a particular device (many answers to a similar question mention this point) ?
Thanks.
Upvotes: 0
Views: 334
Reputation: 22637
These things are not possible without rolling your own Android dist or finding one that supports such a thing (you might Google for "android kiosk"). Android specifically makes it impossible for apps to circumvent the home button to prevent apps from doing what you suggest. "Home" is meant to be a safe, "get me out of here" button that will always get the user back to a safe place.
Android 5.0 introduced something called "screen pinning" that allows the device to be locked into a single app. It requires user intervention though; you aren't going to be able to do that without asking the user.
https://plus.google.com/+AndroidDevelopers/posts/fJ9kM4acejL
Others have suggested making your app a "home" app, meaning that it responds to the home button, along with the stock launcher. This is really not a good idea though. When the use presses home, they will get a chooser asking them which home app to launch. That will almost certainly make them uninstall your app.
Upvotes: 1