android - 如果 url 具有特殊字符,如何在 android 中使用 url 深度链接应用程序

标签 android url xamarin

我希望我的应用程序只在表单中的一个 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/

相关文章:

ios - 如何从 iOS 模拟器获取 IPA 文件

java - 如何查看 android 应用程序生成的所有线程

android - Eclipse 不会为 Butter Knife 生成 .apt_generated 文件夹

Android、iOS 和 Windows 8 包名称

java - 将数据从Android中的另一个类发送到异步任务

javascript - 在express.js中间件请求中获取 "#"之后的url

java - 将客户端证书设置为 Java HTTP 连接中的请求属性?

python - 将 OData 查询编码为 URL

c# - Xamarin:从浏览器重定向到 native 应用程序不起作用

android - 强制 Visual Studio 2017 使用特定的 Android 模拟器