2

我正在为 android 平台开发一个问题跟踪应用程序。所以我需要在我的应用程序中打开一个问题的链接。我知道如何拦截在 AndroidManifest.xml 模式中设置的链接(http://stackoverflow.com/questions/1609573/intercepting-links-from-the-browser-to-open-my-android-app),但我的问题是我不知道我将使用哪个模式。我当前的 AndroidManifest.xml 看起来像

<activity android:name=".activity.InterceptionActivity" >
      <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="*" android:scheme="http"/>
      </intent-filter>
    </activity>

所以我从浏览器打开每个链接,这不是一个好方法。

有ulr例子:

  1. 来自我的跟踪器的问题网址 - http://strintec.myjetbrains.com/youtrack/issue/YD-176 android:scheme 是“http”,android:host 是“strintec.myjetbrains.com”
  2. 从另一个跟踪器发出 url - http://youtrack.jetbrains.com/issue/JT-16912 android:scheme 是“http”,android:host 是“youtrack.jetbrains.com”

我的意思是我不知道跟踪器网址会是什么样子。只有一个共同点 - “/issue/”部分,我尝试使用 android:pathPattern 但它不起作用(也许我做错了)。

是否有任何解决方案如何在已安装的应用程序中设置链接模式?或者别的什么建议。谢谢你。

4

0 回答 0