[英]open Ionic app Android from browser
In my AndroidManifest.xml I stated the following as an example: 在我的AndroidManifest.xml中,我以以下内容为例:
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<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:host="mywebsite.com" />
<data android:scheme="http" />
<data android:path="/.*" />
</intent-filter>
</activity>
And in the browser : 在浏览器中:
<a href="intent://mywebsite.com/#Intent;package=my.package.app;scheme=http;end;"/>Click
And I only get the application in Google Play, no spear as I hope, that I'll be doing wrong? 而且我只在Google Play中获得该应用程序,没有希望的矛,这我做错了吗?
Take a look at this: Launch custom android application from android browser 看看这个: 从android浏览器启动自定义android应用程序
You used http as the scheme, so the link on your website should also start with http:// 您使用http作为方案,因此您网站上的链接也应以http://开头
The basic syntax for an intent-based URI is as follows: 基于意图的URI的基本语法如下:
intent: HOST/URI-path // Optional host #Intent; intent:HOST / URI路径//可选主机#Intent; package=[string];
package = [字符串]; action=[string];
行动= [字符串]; category=[string];
category = [string]; component=[string];
component = [字符串]; scheme=[string];
scheme = [字符串]; end;
结束;
In your URI, you forgot to define the action. 在您的URI中,您忘记了定义操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.