Replace Google Now gesture

有些话、适合烂在心里 提交于 2019-11-27 17:52:46
Raghav Sood

Add the following <intent-filter> to the Activity you want launched from the gesture:

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

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

You will now see an option for your app when you make the swipe now, and will have to select it as the default handler by selecting Always, as shown below.

Budius

It's just a matter of setting the correct intent filter:

<intent-filter>
    <action android:name="android.intent.action.ASSIST"/>
    <category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!