2

I have an app on the appworld and I would like to add a link to it in my app so that people can more easily rate it. Normally on the android market I would do something like:

Uri uri = Uri.parse("market://details?id=com.example.test");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

Or on Amazon I would do:

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);

But when I try the following it does not work:

Uri uri = Uri.parse("appworld://content=000000");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

It pops up a browser and then I get a message about not being able to do it or something. I also tried to launch to the appworld website page but appworld isn't grabbing it. What would be to correct way to handle this link?

Nate
  • 31,017
  • 13
  • 83
  • 207
MinceMan
  • 7,483
  • 3
  • 38
  • 40

2 Answers2

2

The normal market:// link should actually work.

Paul Bernhardt
  • 491
  • 2
  • 6
  • Yes the BB10 tries to map to Blackberry World (formerly known as App World) if the app exists there. Otherwise it will map to google play. – r-hold Jan 26 '13 at 00:22
1

The normal market:// URI didn't work for me. The BlackBerry World app would always show the error:

There was a problem loading this Page due to a network error.

The fix was to detect when my app was running on a BlackBerry device then to use a different URI:

if (java.lang.System.getProperty("os.name").equals("qnx")){
    marketUri = "appworld://content/1234567"
} else {
    //normal Google Play URI
}

You can get your content ID from the BlackBerry World Vendor Portal by clicking on the 'edit' link next to your app. The ID is shown in the first field.

donturner
  • 17,867
  • 8
  • 59
  • 81
  • hmm... odd, I'll double check and see if mine is still working using the market link. – MinceMan Apr 18 '13 at 13:30
  • I tried the "appworld://content/1234567" but it does not work on PlayBook. The normal market link works but some impostor has submitted an illegal copy of my app to BlackBerry App World. For some reason, the market link always take to the listing of that illegal submission which I want to avoid... Any other way out here? – Sriman May 27 '13 at 14:43
  • Hmm, that's not right both in terms of piracy and the link. Email me at doturner@blackberry.com and I'll investigate. – donturner May 28 '13 at 20:54