我正在使用这段代码从链接启动我的应用程序.
<activity
android:name="com.example.myApp.myClass"
android:label="@string/app_name" >
<intent-filter>
<data
android:host="customHostName"
android:scheme="customScheme" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
Run Code Online (Sandbox Code Playgroud)
这是href链接,我想最终获得密钥.
customScheme://customHost/49FYTJTF00
Run Code Online (Sandbox Code Playgroud)
它在以前的所有Android版本上运行良好,但不适用于Lollipop.
当我点击链接时,它只显示要启动的浏览器列表.
我该怎么办?
android hyperlink intentfilter android-intent android-5.0-lollipop