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

Adobe AIR Development

Reply
New Developer
DifferenceGames
Posts: 7
Registered: ‎12-27-2010
My Device: Not Specified
Accepted Solution

Linking to Apps from within an App

What is the best way to link to one app from within another?

 

We have a series of games and would like to cross promote them.  

 

Another idea could be a link to AppWorld that shows all of our games.  The best way I can do this right now on the PlayBook is to search for DifferenceGames.  

 

Is there a way to pull up AppWorld and have it execute and display a search result?

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Linking to Apps from within an App

There should be an "app:" or "appworld:" (or similar) URL that we can use in navigateToURL(), but I haven't yet seen details on the format of the data that would follow. Probably an app id number of some kind, but I don't know.

For now, perhaps just use a regular URL directly to your page in the web-based app world, so it will launch the web browser instead.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
Ebscer
Posts: 865
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: Linking to Apps from within an App

You can kindof do this. For example

 

navigateToURL(new URLRequest(“http://appworld.blackberry.com/webstore/content/1839″))

will actually launch BlackBerry AppWorld. This is however a bit of a hack. For more details see http://news.ebscer.com/2011/05/how-to-invoke-appworld-in-actionscript/

 


Read my thoughts on BlackBerry Development at news.ebscer.com
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Linking to Apps from within an App

FYI, the URL scheme is "appworld:", though with only a bit of experimentation so far I haven't been able to get it to open the page for a given app, just the App World app itself.  You can do that with this:

navigateToURL(new URLRequest('appworld://'));

If some enterprising young fellow wants to experiment further and figure out what the path/parameters may look like to get the job done, that would be worth some kudos. :smileyhappy:

 


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
New Developer
DifferenceGames
Posts: 7
Registered: ‎12-27-2010
My Device: Not Specified

Re: Linking to Apps from within an App

Thanks guys!  This is very helpful.  If I find out anymore details I'll post here again.

Please use plain text.
Developer
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: Linking to Apps from within an App

Here's the URL scheme. Pretty easy to use.

 

 

appworld://content/1839

 

 

 

RESPONSE
HTTP/1.1 302 Moved Temporarily
Server: AkamaiGHost
Content-Length: 0
Location: appworld://content/1839
Date: Fri, 06 May 2011 16:54:54 GMT
Connection: keep-alive

REQUEST
GET /webstore/content/1839 HTTP/1.1
Host: appworld.blackberry.com
User-Agent: Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.8,en-gb;q=0.5,en-ca;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: UTF-8,*
Keep-Alive: 115
Connection: keep-alive

 

 

 

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Linking to Apps from within an App

@studiochris, is that from some docs, or just good guesswork?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
New Developer
DifferenceGames
Posts: 7
Registered: ‎12-27-2010
My Device: Not Specified

Re: Linking to Apps from within an App

I'll confirm that this works beautifully!

Thanks so much!

Please use plain text.
Developer
studiochris
Posts: 165
Registered: ‎10-26-2010
My Device: BlackBerry® PlayBook™
My Carrier: .

Re: Linking to Apps from within an App

It's from spoofing the PlayBook Browser's User Agent in Firefox and seeing where the request is redirectedwhen navigating to a URL in App World. That particular URL probably won't work on PlayBook since it's to a phone app, but tablet apps should since that's where RIM is sending the requests.

Please use plain text.
Contributor
HybridMind
Posts: 24
Registered: ‎03-28-2011
My Device: PlayBook Developer
My Carrier: N/A

Re: Linking to Apps from within an App

I see that does work great.  Very cool!  I realized now why trying the same thing with "appworld://vendor/xxxx" doesn't work.  There isn't a "vendor" equivalent page in the App World that I can find!  Seems like the only way you can do cross promotion currently is to manually build little buttons with thumbs in your game/app that link direct to those apps.  I was hoping to just have a general "visit my vendor page" kind of button that showed all my games.  No such luck I guess.  At least thanks to your reverse engineering here you can build a manual page anyway. Thanks.

Please use plain text.