2016-11-18 131 views
0

我要打开我的活动时,我的网页上的链接,在用户点击,指向一个ITR文件,目前我有:当链接打开打开活动

<activity 
    android:name=".ui.Activity" 
    android:label="@string/activity_load" 
    android:theme="@android:style/Theme.Translucent.NoTitleBar"> 
    <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" android:host="www.mywebsite.com" android:pathPattern="*.itr"/> 
    </intent-filter> 
</activity> 

该网页是在此页面上打开http://www.mywebsite.com/contents,用户可以点击指向itr文件的链接。然而我的活动没有打开,任何提示?

+0

看看[this](http://stackoverflow.com/a/8599921/6950238)答案。 –

+0

请查看http://christopher5106.github.io/mobile/2015/03/26/web-redirection-to-mobile-web-or-app-with-a-modal-box.html – manichandra

回答

2

只需从您的意图过滤器中的data节点中删除pathPattern。 路径模式限制uri遵循应用标准check here