【发布时间】:2017-02-09 21:58:07
【问题描述】:
我希望在单击具有特定自定义方案的链接时启动我的应用程序。 但它只适用于 adb:
./adb shell a start -a Android.Intent.Action.VIEW -d "ghd://whateversite.com"
点击链接,或者直接在浏览器中写入URL时不起作用。
我正在使用:
<activity
android:name=".link.LaunchActivity"
android:theme="@android:style/Theme.NoDisplay">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</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="ghd" />
</intent-filter>
</activity>
【问题讨论】:
-
那你是怎么解决的?