【发布时间】:2013-05-03 07:15:34
【问题描述】:
我正在尝试设置一个意图过滤器以在用户单击以下 URI 时启动我的活动: example.com/pathA/pathB/#pathC/someGUID
所以我在清单文件中添加了以下 XML:
<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="example.com"
android:pathPrefix="/pathA/pathB/#pathC"
android:scheme="http" />
</intent-filter>
我在想 '#' 字符搞砸了一切,但我尝试转义这个字符但没有运气。有什么想法吗?
更新:当我说“尝试转义”时,我的意思是使用百分比编码(# 等于 %23)
【问题讨论】:
标签: android android-activity intentfilter