I am able to get mouse middle button click event in android application. But before getting this onGenericMotionEvent
callback my application is going home.
I have already tried below solution, Because of this one every time while click on mouse middle button content resolver asking to select launcher for home.
added below intent filters to for my activity in the manifest to make it as a home application
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
I do not want to show that kind of dialog in application screen. Is there any way to handle it? How to restrict this go to home behavior? Could you please let me know if anyone has any idea about this?