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
New Contributor
Posts: 3
Registered: ‎03-25-2012
My Device: Playbook 16GB
My Carrier: none
Accepted Solution

Creating a full browser web icon for Playbook

 

Following the steps on this page below I am stuck at the full browser creation part due to some certificate error msgs on the command line.  Does this post require updating?  I am able to create a 'chromeless' web app, but I need to create a full browser one to access external URLs.

 

*http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-Create-a-Web-Icon-for-Bla...

 

For the following command, where do signing_cert.p12 & -storepass come from?  Is there another registration step somewhere?  

 

blackberry-uripackager -package bbc.bar blackberry-tablet.xml img\pb_icon.png -buildId 1 -signRIM -signDev -keystore signing_cert.p12 -storepass xxxxxxxxxxxxxxxx -cskpass xxxxxxxxxxxxxxx

 

thanks

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Creating a full browser web icon for Playbook

Hi there,

 

That KB article may be out of date.  It does pre-date our formal documentation about getting started building a WebWorks application:

https://bdsc.webapps.blackberry.com/html5/documentation

 

It sounds like you have everything else in place - have created your app + icon, etc. The *.p12 stuff is related to code signing, which is necessary in order to run your app on a live device. 

 

 

 

Suggest a quick read through the code signing doc, which includes how to install and setup your keys and then how to use them to sign your app:

https://bdsc.webapps.blackberry.com/html5/documentation/ww_publishing/signing_your_app_1920008_11.ht...

 

Good luck.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Highlighted
New Contributor
Posts: 3
Registered: ‎03-25-2012
My Device: Playbook 16GB
My Carrier: none

Re: Creating a full browser web icon for Playbook

I can create a *.bar that runs an embedded webpage, but what do I need to do to create a "full browser'' web icon.  ie one that allows links to open in new pages //and shows the url bar on top of browser window like the Archambault web app.

 

Is there some code to place in config.xml to allow this?

 

I cannot find it anywhere in the docs.

 

thanks,

MMTL

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Creating a full browser web icon for Playbook

No there is not. A WebWorks application is a chromeless instance of the same rendering engine used by the native browser app, but does not share the chrome.

 

I think what you are looking for is a way of launching the Browser application to a target URL from an icon on the homescreen.  You could technically do this with JavaScript, but you will want to define a loading screen image in your config.xml file otherwise you'll see a white splash screen before the browser launches.

 

Here's an example:

 

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" 
        version="1.0.0.1" id="openbrowser" xml:lang="en">

	<name>open browser</name>

	<content src="index.html"/>
	<icon src="images/icon.png"/>
	
	<feature id="blackberry.invoke" required="true" version="1.0.0.0"/>
	<feature id="blackberry.invoke.BrowserArguments" required="true" version="1.0.0.0"/>
	<feature id="blackberry.app" required="true" version="1.0.0.0"/>
	
</widget>

 

 

index.html

 

<!DOCTYPE html>
<html>
<body>
	<script>
		window.addEventListener("load", function(e) {
			
			//Open the URL
			var url = "http://devblog.blackberry.com";
			var args = new blackberry.invoke.BrowserArguments(url);
			blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args);

			//close this app
			blackberry.app.exit();
		}, false);
	</script>
</body>
</html>

 

 

Note: the PlayBook browser app itself has a "bookmark to homescreen" feature.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
New Contributor
Posts: 3
Registered: ‎03-25-2012
My Device: Playbook 16GB
My Carrier: none

Re: Creating a full browser web icon for Playbook

this is gold - thank you

 

 

Contributor
Posts: 38
Registered: ‎01-21-2012
My Device: Bold 9900
My Carrier: Iusacell

Re: Creating a full browser web icon for Playbook

Hi.

 

Is this example work for a Web Icon For BlackBerry Devices with OS 4+

 

 

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Creating a full browser web icon for Playbook

For supporting 4.x software, there is an older way of creating a "browser launcher". This technique uses Java and pre-dates the WebWorks platform:

http://supportforums.blackberry.com/t5/Java-Development/Invoke-the-browser/ta-p/445362

 

 

That being said, developers are highly encouraged to focus on newer operating systems instead of the much older 4.x OS:

https://developer.blackberry.com/appworld

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Contributor
Posts: 38
Registered: ‎01-21-2012
My Device: Bold 9900
My Carrier: Iusacell

Re: Creating a full browser web icon for Playbook

Hi Astanley.

 

Tyvm for your reply.

 

Ok. I have made this example and is already working on my playbook. And i just send it for validation for the App World.

 

But know i try to do the same for the Smartphones. So i used the WebWorks for Smartphones instead. But when i run my application on my Bold 9900 i get an error about a secure API and it cannot go forward from that point and i don't get my browser open.  Hope you can help me out on how to get things done for the Smartphones platform.