简体   繁体   中英

Alternative way for overriding home button

I have developed the app which is using by patients. Hospital management provide the device with app to every patient in hospital. So management asks me to run only this app in device (our devices have the version above android 3.0).I made the app which is run after booting is completed. I disabled back button. But i can't override home button. I know there is no way to override home button. But i must do it. My need is that user should not come out from the app. Give some other alternative ways.

make the app a launcher app, that way they will not be able to exit the app when the home button is pressed

add this to your activity

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM