I’m writing an industry application which will be used by traffic wardens to register offences through my program using forms.
The app is using a webview so it is just a container for an external webpage. We don’t want our users to exit the application so we have to disable all buttons. I succeeded in disabling them except for the home button.
I read some threads about this topic, but I don’t have any solutions yet. The idea is that I am able to make the app the default home app so if the user presses the home button it launches my app and does not exit. How can I accomplish that? If we must we are able to tamper with android itself (when we install the app), but if there is some solution through configuration it would be appreciated.
There is a sample Home application in your Android SDK. Mirror its manifest entry, notably putting the
HOMEcategory in the activity’s<intent-filter>.The first time the, er, traffic warden taps HOME after installing your app, a chooser will appear for which home app to run. Checking the checkbox and tapping your app will then mean the HOME button will run your app forevermore.
Beyond creating a custom home app, though, there is no way to intercept the HOME button except through firmware modifications.