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

Web and WebWorks Development

Reply
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Carrier: wifi
Accepted Solution

Link to App World from App

Normal links to apps in app world don't work. 

 

I also tried the following http://stackoverflow.com/a/5390526/773263

 

Gives me an error as well.

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Link to App World from App

Do you have a test case?

What sort of errors do you see?

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Carrier: wifi

Re: Link to App World from App

Example code:

<a href="http://appworld.blackberry.com/webstore/clientlaunch/20393793">test</a>

When I do that a page from App World loads in the webview pop up that says 'internal server error.

Also tried using the link

http://appworld.blackberry.com/webstore/content/18560198/

When I do this I just get a white screen in the webview popup.
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
BlackBerry Development Advisor (Retired)
mimendoza
Posts: 64
Registered: ‎06-04-2012
My Carrier: Bell

Re: Link to App World from App

Are you displaying the link from a webpage? Or from within another app? Do you want to launch the browser to open the page or open the BlackBerry World app and direct the user to the specified app listing on BB World?
----------------------------------------------------------------------------------
- Did this post help solve the issue? Click on "Accept as Solution"
- Was the content of this post helpful? Please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Carrier: wifi

Re: Link to App World from App

Ideally I would like to have my own list of apps I made pop up in the webview, from within my app. This way I can update a list of other apps for all of my apps at once without having to submit an update to BlackBerry World.

When the user clicks on one of the links I want it to open up in the BlackBerry World app so they can download it.

That being said I have tried linking directly within the app and from the webview pop-up within my app and both times had the same result.
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
BlackBerry Development Advisor (Retired)
mimendoza
Posts: 64
Registered: ‎06-04-2012
My Carrier: Bell

Re: Link to App World from App

[ Edited ]

In that case, it seems like you want to invoke the BlackBerry World app.

 

See our WebWorks invoke sample on github here, our WebWorks invocation documentation here, and our BlackBerry World invocation attributes here.

 

Here is a snippet of how to invoke the wifi settings within the main settings app:

 

function invokeWiFiSettings() {
    blackberry.invoke.invoke({
        target: "sys.settings.target",
        uri: "settings://wifi"
    }, onSuccess, onError);
}
 

You also want to make sure you add the blackberry.invoke feature id in your config file and specify the domain in the webview that will invoke BlackBerry World. e.g:

 

<access uri="http://www.somedomain.com" subdomains="true">
    <feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>
----------------------------------------------------------------------------------
- Did this post help solve the issue? Click on "Accept as Solution"
- Was the content of this post helpful? Please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Carrier: wifi

Re: Link to App World from App

[ Edited ]

Thanks that works great from within the app directly.

Is there anyway I could get the appworld:// links to work from the child web view?

 

EDIT: Sorry didnt' try adding the 

 

<access uri="http://www.somedomain.com" subdomains="true">
    <feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

 

part. Will try that now

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
BlackBerry Development Advisor (Retired)
mimendoza
Posts: 64
Registered: ‎06-04-2012
My Carrier: Bell

Re: Link to App World from App

The information that I wrote above should also work from within the child browser, as long as you allow the domain to access that feature (using the <access uri> code above)
----------------------------------------------------------------------------------
- Did this post help solve the issue? Click on "Accept as Solution"
- Was the content of this post helpful? Please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Carrier: wifi

Re: Link to App World from App

Still having problems

My config.XML

<?xml version="1.0" encoding="utf-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
id="CityscapeBG"
version="0.0.0.4">
<name>Cityscape BG</name>
<icon src="iconL.png"/>
<description>Cityscape Wallpaper</description>
<author href="http://philipk.ca">PhilipK</author>
<content src="index.html" />
<rim:splash src="splash.jpg" />
<feature id="blackberry.app.orientation">
<param name="mode" value="portrait" />
</feature>

<access uri="http://philipk.ca" subdomains="true">
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<feature id="blackberry.invoke" />
<feature id="blackberry.invoke.card" />
<feature id="blackberry.ui.toast" />
<feature id="blackberry.system" />

</widget>


The HTML from the child browser

<a href="appworld://content/20393793"><li>test</li></a>
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Please use plain text.
BlackBerry Development Advisor (Retired)
mimendoza
Posts: 64
Registered: ‎06-04-2012
My Carrier: Bell

Re: Link to App World from App

You'll need to call a method when the user clicks that link since you also have to specify the target app to invoke.

 

For example:

function invokeWiFiSettings() {
    blackberry.invoke.invoke({
        target: "sys.settings.target",
        uri: "settings://wifi"
    }, onSuccess, onError);
}
 
Take a look at our invoke sample on github again, and see how the other apps are invoked.
----------------------------------------------------------------------------------
- Did this post help solve the issue? Click on "Accept as Solution"
- Was the content of this post helpful? Please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Please use plain text.