有些项目可能要求从程序外部吊起自己的app,实现做法十分简单。
首先。在AndroidManifest文件中,你想吊起的Activity标签中加入intent-filter。内容如下:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="freeman" android:host="showInfos"/>
</intent-filter>
以下是一些注解(引用自:https://developers.google.com/app-indexing/android/app?hl=zh-cn)
标记 |
---|