android清单

时间:2017-05-16 06:59:19

标签: android pattern-matching android-manifest

我正在为Android实现深层链接,需要知道匹配以下网址的模式

<data android:host="*.fa.dk" android:pathPattern="" android:pathPrefix="/Product.aspx" android:scheme="https" />

网址如下

  1. test.fa.dk/Customer_1/Product.aspx(应该匹配)
  2. test.fa.dk/Customer_2/Product.aspx(应该匹配)
  3. test.fa.dk/Third_Customer_3/Product.aspx(应该匹配)
  4. 其中Customer_1 / Customer_2 / Third_Customer_3可能包含网址中允许使用的任何字母/数字和特殊字符。

1 个答案:

答案 0 :(得分:0)

你的模式看起来像.*/Product.aspx。这里.*匹配0到多个字符的任何序列。

<intent-filter android:label="@string/filter_title_viewgizmos">
    <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="*.fa.dk"
          android:pathPattern=".*/Product.aspx" />
</intent-filter>