我希望我的应用程序只在表单中的一个 url 上打开
http://www.myhost.com/#/followThis/Param1/Param2
这是我的 Intent
<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="myhost.com" android:scheme="http" android:path="/#/followthis" />
<data android:host="www.myhost.com" android:scheme="http" android:path="/#/followthis" />
</intent-filter>
现在如果我用任何字母替换 # 说 'a' 它工作正常 我有什么办法可以得到这个???
最佳答案
尝试:
String query = URLEncoder.encode("apples oranges", "utf-8");
String url = "http://stackoverflow.com/search?q=" + query;
关于android - 如果 url 具有特殊字符,如何在 android 中使用 url 深度链接应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29289759/