Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Reply
New Developer
Posts: 5
Registered: ‎04-07-2009
My Device: Not Specified

How to open BB App World from an android App

Hi, I am converting an android app to an unsigned bar and testing on my device. All works fine without any code changes, except that I have a screen where I list my other apps. On click of these apps I want to open them in BB app world. How can I do that?

This is my code

 

public static void onOtherAppClicked(Activity activity, String link) {

Intent intent = new Intent(Intent.ACTION_VIEW);

 

String marketNameSpace = "";

if (ApplicationDetails.getMarketName() == TypeOfMarket.GOOGLE) {

    marketNameSpace = "market://details?id=";

} else if (ApplicationDetails.getMarketName() == TypeOfMarket.AMAZON) {

    marketNameSpace = "amzn://apps/android?p=";

} else if (ApplicationDetails.getMarketName() == TypeOfMarket.SAMSUNG) {

    marketNameSpace = "samsungapps://ProductDetail/";

} else if (ApplicationDetails.getMarketName() == TypeOfMarket.BLACKBERRY) {

    //TODO CODE TO OPEN BB APP WORLD COMES HERE.

}

 

intent.setData(Uri.parse(marketNameSpace + link));

 

try {

    activity.startActivity(intent);

} catch (Exception e) {

    UIUtils.toast(activity, "Application not found");

}

 

    }

Retired
Posts: 140
Registered: ‎04-19-2013
My Device: BlackBerry Z10

Re: How to open BB App World from an android App

One of two ways.

 

You can use appworld:// as any other native app would and we will pass that along unchanged.

 

Or we will try and interpret market:// but and translate it to an equivalent appworld:// but this isn't consistent and works depending on the version of the OS and AppWorld.

 

So I suggest sticking with appworld://

 

https://developer.blackberry.com/native/reference/bb10/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_r...