Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to launch AppWorld from an application? [BlackBerry]

This might be a easy question but i couldn't find solution. I want to open AppWorld by clicking a button in my BB application. For example when user clicks this button Appworld will show "Facebook Application" page. Can i do this?

In Android platform this line launches GooglePlay for Facebook App. Does BlackBerry supports this kind of method?

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.facebook.katana")));
like image 482
KAPLANDROID Avatar asked Dec 21 '22 15:12

KAPLANDROID


2 Answers

Here is a simple way to do this:

Browser.getDefaultSession().displayPage("http://appworld.blackberry.com/webstore/content/2360/?lang=en");

Above code will invoke the browser in the application and open the BlackBerry App World, I tested it in device and it's perfectly working. For now I put a Whats App messenger link, but you can customize the link according to your requirement.

like image 132
AK Joshi Avatar answered Jan 31 '23 04:01

AK Joshi


You can open App World from your BB application directly using the following code. This code avoids opening the browser first.

Registry registry = Registry.getRegistry(this.getClass().getName());
Invocation invocation = new Invocation(null, null, 
                                       "net.rim.bb.appworld.Content", 
                                       false, ContentHandler.ACTION_OPEN);
invocation.setArgs(new String[] { /* app id in appworld */ });
registry.invoke(invocation);
like image 40
rfsk2010 Avatar answered Jan 31 '23 06:01

rfsk2010