如何在Android中将Cordova应用添加到浏览器列表
我想注册我的应用程序,以便Android将其识别为浏览器,这样用户在看到http链接的“打开方式”时可以选择我的应用程序 配置中是否有要执行的插件或配置如何在Android中将Cordova应用添加到浏览器列表,android,cordova,phonegap,Android,Cordova,Phonegap,我想注册我的应用程序,以便Android将其识别为浏览器,这样用户在看到http链接的“打开方式”时可以选择我的应用程序 配置中是否有要执行的插件或配置 谢谢。我已经找到了我问题的答案,我希望这能帮助其他人寻找答案。 您可以参考工作得很好的方案,只需将方案设置为“https”,应用程序就可以接收https调用 cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=https 现在,如果您希望它也接受htt
谢谢。我已经找到了我问题的答案,我希望这能帮助其他人寻找答案。 您可以参考工作得很好的方案,只需将方案设置为“https”,应用程序就可以接收https调用
cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME=https
现在,如果您希望它也接受https并可能添加其他方案,则需要编辑AndroidManifest文件并添加以下内容:
<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="https" />
</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="http" />
</intent-filter>
多谢各位