In a business context (not commercial app), I need to avoid middle button click behaviour, that is to say displaying Home Screen
I spent hours browsing Stackoverflow pages, and the conclusion is often :
- it's not possible, regarding obvious security considerations
My need is a bit different :
- I use a connected mouse, I don't want to override device hardware button.
- my app will only be use in a business context, not publicly.
Details :
- my device is a Samsung Galaxy 3 (Model Number GT-P5210, Android version 4.2.2)
- the mouse is a classical 3-buttons mouse (left-click, mouse wheel, right-click)
I can accept :
- to override OnPause, OnUserLeaveEvents (https://stackoverflow.com/a/32938986/2773267 doesn't work in my case)
- to modify my manifest
- to use a service (watchdog-like), that prevent Home display
- to root the device (last-chance solution):
- modify /system/usr/keylayout (part of https://stackoverflow.com/a/29311126/2773267 answer)
- all others solution, excepted those I can't accept :)
I can't accept :
- using service (as in http://www.piwai.info/chatheads-basics/)
-- Thanks, Jerome.
Excuse my awful english, I'm french !