[英]launch android app with custom uri
I tried to launch my android application with a link into an email. 我试图启动带有电子邮件链接的android应用程序。
https://hostname.com/somethingAndParameter
My server redirect this link to: 我的服务器将此链接重定向到:
myscheme://host
i tried this intent-filter but it doesn't work: 我试过这个意图过滤器,但是不起作用:
<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="host" android:scheme="myscheme"/>
</intent-filter>
Since you are not understanding by way of comments, let's try an answer... 由于您无法通过评论来理解,因此请尝试一个答案...
Change your <intent-filter>
to: 将您的
<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="https"
android:host="hostname.com"
android:path="/somethingAndParameter"/>
</intent-filter>
Now your https://hostname.com/somethingAndParameter
URL works on: 现在您的
https://hostname.com/somethingAndParameter
URL适用于:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.