3

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 :

I can't accept :

-- Thanks, Jerome.

Excuse my awful english, I'm french !

Community
  • 1
  • 1
jsiot
  • 126
  • 4
  • 16

2 Answers2

2

Putting this 3 lines to the manifest solved the problem. Firstly it didn't work because I made a mistake on activity name

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.HOME" />
    <category android:name="android.intent.category.DEFAULT" />
  </intent-filter>

Thanks !

--

Jerome

jsiot
  • 126
  • 4
  • 16
0

You can build your app as a HOME-screen replacement. In this case, your app IS the HOME-screen, so pressing HOME does nothing.

David Wasser
  • 93,459
  • 16
  • 209
  • 274