隐藏APP桌面图标
<activity android:name=".LaunchActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<data android:host="LaunchActivity" android:scheme="com.tuobang.xsfx" tools:ignore="AppLinkUrlError"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
-
在manifest的入口activity里面intent-filter中设置元素。
注:必须添加tools:ignore="AppLinkUrlError"
,否则会出错,host值为自定义,scheme值为包名 -
注意,android:scheme是大小写敏感的,必须以小写字母开头
也就是这个MainActivity可以响应Uri为com.android.example://AuthActivity的特定 Intent