我正在开发需要自定义URL方案的应用程序,看起来像"appname://"
我搜索了很多东西,也找到了很多相关的问题,但我还是遇到了麻烦.
我如何从浏览器测试此URL方案?目前,每当我输入浏览器的地址栏"appname://"时,它就会直接进入谷歌搜索.
我在AndroidManifest.xml中有这个:
<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="appname"
android:host="appnamehost"/>
</intent-filter>
Run Code Online (Sandbox Code Playgroud)