Disabling Android home button for industry application

后端 未结 2 818
失恋的感觉
失恋的感觉 2021-02-09 11:44

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

2条回答
  •  情话喂你
    2021-02-09 12:34

    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?

    There is a sample Home application in your Android SDK. Mirror its manifest entry, notably putting the HOME category in the activity's .

    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.

提交回复
热议问题