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

BlackBerry® World™ Development

Reply
Administrator (Retired)
mkirkup
Posts: 179
Registered: ‎07-14-2008
My Device: Not Specified

How To - Invoke BlackBerry App World directly to your application from a web page

One of the common requests we have been receiving over the past couple of months is to show developers how they can provide a link on their webpage which if selected on the device will open up BlackBerry App World and automatically open up the appropriate page for your application.  This should make it easier for you to recommend your application to customers who are visiting your website from their mobile browser. 

 

NOTE: This will not work if you are using a desktop browser so you want to handle it appropriately within your website.

 

1.  Configure your webserver to accept a ".bbaw" file essentially adding a mime type.

2.  Create a simple text file with an extension of .bbaw" with your application ID inside it.  Your application ID should be the only thing in the file and it should be on the first line with no other information.

 

 

 

 

Mike Kirkup
Director, Developer Relations
Please use plain text.
Developer
jonberry
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: How To - Invoke BlackBerry App World directly to your application from a web page

What's the full mime type?

 

How do you get the application ID?

Please use plain text.
Administrator (Retired)
mkirkup
Posts: 179
Registered: ‎07-14-2008
My Device: Not Specified

Re: How To - Invoke BlackBerry App World directly to your application from a web page

The content type is “application/x-bb-appworld”.  The file type on the server does not necessarily need to be “bbaw”, it simply needs to be a script which returns the correct content type and the application id as the body, it could be a jsp or php file for example that generates the links dynamically.  For example here is a JSP script which reads an app ID from the query parameters and launches that app:

 

 

<%
response.setHeader("Content-Type", "application/x-bb-appworld");
response.getWriter().print(request.getParameter("id"));
response.getWriter().close();
%>

 

On a related note, you cannot determine on the server from the browser request whether App World is already installed on the user's device.

 

 

Mike Kirkup
Director, Developer Relations
Please use plain text.
Developer
cwong15
Posts: 193
Registered: ‎02-27-2009
My Device: Not Specified

Re: How To - Invoke BlackBerry App World directly to your application from a web page

Thanks, but that still doesn't tell us how to get the application ID. The vendor portal does not show the application ID in the "Manage Applications" list. Is it the contentId parameter (4 digit number for me) embedded in the edit link?
Please use plain text.
Developer
pwerry
Posts: 177
Registered: ‎01-21-2009
My Device: 9900
My Carrier: Vodafone

Re: How To - Invoke BlackBerry App World directly to your application from a web page

There used to be a knowledgebase article describing how to grab that information but it seems to have been pulled off. At any rate here is the relevent code:

 

String RIM_APP_WORLD_ID = "RIM_APP_WORLD_ID";

 

CodeModuleGroup group = null; CodeModuleGroup [] groups = CodeModuleGroupManager.loadAll(); for( int i = 0; i < groups.length; ++i ) { if( groups[ i ].getFriendlyName().equals( appName ) ) { group = groups[ i ]; break; } } String myContentId = group.getProperty( RIM_APP_WORLD_ID );

 

 

You can determine the ID of your app by downloading it from app world and then running this code from another app.

Please use plain text.
BlackBerry Development Advisor
rhearty
Posts: 300
Registered: ‎03-13-2009
My Device: BlackBerry Z30
My Carrier: RIM

Re: How To - Invoke BlackBerry App World directly to your application from a web page

cwong15,

 

This is correct.  If you click on your application under Manage Applications, the 'contentID=' in the URL is the applicationID required here.  It should currently be a 3 or 4 digit number.

Please use plain text.
New Developer
johnforsyth999
Posts: 2
Registered: ‎06-15-2009
My Device: Not Specified

Re: How To - Invoke BlackBerry App World directly to your application from a web page

Hello,

 

I have attempted to do this, but the device browser just continuously shows "loading".  AppWorld never loads.

 

I am able to retrieve my test bbaw file manually using wget, and it shows the correct content type 'application/x-bb-appworld'. As the article instructs, I have a file with a single line containing the application ID on the web server.

 

My device specs are below. Any help or ideas are appriciated.

 

Thanks

 

Blackberry Bold 9000

v4.6.0.282 

Please use plain text.
Developer
marcn
Posts: 53
Registered: ‎01-08-2009
My Device: Not Specified

Re: How To - Invoke BlackBerry App World directly to your application from a web page

On a related note, is it possible to start up App World programatically from an app using the methods in this KB article: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/How_To_... ?

 

Specifically, I'm wondering if the App World application takes any arguments to specify the application you'd like to display within App World.  This would be a convenient way to cross-promote one app from another.

 

Thanks,

Marc

 

Please use plain text.
Developer
robinShazam
Posts: 85
Registered: ‎12-05-2008
My Device: Blackberry 8900 Javelin

Re: How To - Invoke BlackBerry App World directly to your application from a web page

Sorry for the necro, but I have the same issue as johnforsyth999: invoking BBAW using a special MIME and app id via browser is showing "loading" in the browser and app world does not start. App World is installed on the device. This is on a Bold 9000 handset, v4.6.0.167 (AT&T branded)

 

If i try in a 4.2.1 simulator with no app world i get Unsupported media type: application/x-bb-appworld so the mime is ok.

 

Has anyone got any thoughts on this? Our invoke file is http://www.shazam.com/applications/trial.bbaw

Please use plain text.
Developer
robinShazam
Posts: 85
Registered: ‎12-05-2008
My Device: Blackberry 8900 Javelin

Re: How To - Invoke BlackBerry App World directly to your application from a web page

The not-invoking issue appears to be related to the version of BBAW. 1.0.0.30 didn't work; 1.1.0.15 does. I'm sure you can all rest easier at night knowing that :smileywink:
Please use plain text.