joecks
joecks

Reputation: 4637

Override longpress Home Button Action (Assistant)

It is possible to long press on the home button in Android 6 and the scan the screen (Now on tap, or the Assist API), which uses an accessibility feature to scan the screen.

Example of the Assist Api

Is it possible to override the long press behavior. If yes which intent filter is it? Thanks.

Upvotes: 0

Views: 1510

Answers (2)

CrandellWS
CrandellWS

Reputation: 2804

The intent action for the "intent-filter" is

<action android:name="android.intent.action.ASSIST"/> 

You might read http://developer.android.com/training/articles/assistant.html

Upvotes: 2

CommonsWare
CommonsWare

Reputation: 1007359

Is it possible to override the long press behavior.

You can create your own assistant. The user can then opt into using your assistant, instead of Now On Tap, via the Settings app.

Otherwise, you have no means of intercepting a long-press on navigation buttons like HOME.

If yes which intent filter is it?

Um, it's significantly more complicated than that, and there's no activity required in the process. The limited documentation can be found here, and this sample project of mine implements one.

Upvotes: 3

Related Questions