我在appworld上有一个应用程序,我想在我的应用程序中添加一个指向它的链接,以便人们可以更容易地对其进行评分。通常在android市场上,我会这样做:
Uri uri = Uri.parse("market://details?id=com.example.test");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);或者在亚马逊上,我会这样做:
Uri uri = Uri.parse("http://www.amazon.com/gp/mas/dl/android?p=com.example.test");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);但当我尝试以下操作时,它不起作用:
Uri uri = Uri.parse("appworld://content=000000");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);它会弹出一个浏览器,然后我会收到一条消息,告诉我不能这样做。我也试图打开appworld网站的页面,但是appworld没有抓住它。什么是正确的方式来处理这个链接?
发布于 2012-11-18 00:43:52
正常的market:// link应该可以正常工作。
发布于 2013-04-17 06:56:51
普通的market:// URI对我不起作用。BlackBerry世界应用程序将始终显示以下错误:
There was a problem loading this Page due to a network error.修复方法是检测我的应用程序何时在BlackBerry设备上运行,然后使用不同的URI:
if (java.lang.System.getProperty("os.name").equals("qnx")){
marketUri = "appworld://content/1234567"
} else {
//normal Google Play URI
}你可以通过点击你的应用旁边的“编辑”链接从BlackBerry World Vendor Portal获取你的内容ID。ID显示在第一个字段中。
https://stackoverflow.com/questions/13291002
复制相似问题