1
I need to disable the use of the physical button of the Android device (preferably versions higher than 4.0). With researches I found some solutions such as removing actionbar, leaving the application in "fullscreen". I need to use actionbar. I found a not very good solution, which uses the following tags in the manifest:
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.MONKEY"/>
With this presents a popup asking what action I want to use, Home Screen of the device or call my application. When selecting my application, a new application instance is created...
In short, I need to block the activation/ use of the device’s home physical button within the application. I can’t remove actionbar, I can’t start a new application instance, and I can’t block the back button (physical back button).
That question of the SO discusses this theme. Specifically, the first response to the question seems to work. I have not yet tested, but...
– carlosrafaelgn
But I cannot remove actionbar, the first removes the action.
– Victor CS
Hi Victor! Got it... In that case, it would be interesting for you to edit the question to make that clear, so the staff doesn’t have to come read the comments.
– carlosrafaelgn
I made the Carlos edition, thanks for your help!
– Victor CS