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: 6
Registered: ‎02-20-2011
My Device: Not Specified

Running web apps full screen on Playbook

I'm a Sencha Touch developer and one of the cool features of web apps on iOS devices is the way you can add them to the home screen as an icon and run them by clicking the icon. They then run full screen without any browser chrome so they appear to be native apps.

Is it possible (or will it be possible) to do something similar in the Playbook? My Sencha apps look great in the Playbook browser but you can see the browser chrome at the top of the app.

Thoughts/ideas appreciated

Rob
New Contributor
Posts: 6
Registered: ‎02-20-2011
My Device: Not Specified

Re: Running web apps full screen on Playbook

OK I think I see what you are supposed to do - wrapper the whole web app as a WebWorks application.

 

I have to say that from what I've read, it appears to be a very complex and tortuous process, particularly, as I say, if you compare it to the simplicity of what's involved in iOS.  

 

OK, on iOS if you want a web app to be submitted to the App Store (eg in order to monetise it) then you need to go through the process of wrappering it in something like PhoneGap which I guess is a similarish exercise, but there is a whole class of mobile web apps where such a process is unecessary and the "add to Home Screen" mechanism is sufficient.

 

I'd like to suggest to the Blackberry folks that an "add to Home Screen" equivalent should be considered for the Playbook and this will really encourage rapid development of web-based apps on this device.

 

 

 

Developer
Posts: 71
Registered: ‎02-04-2011
My Device: Blackberry Bold & Pearl
My Carrier: Telecom NZ

Re: Running web apps full screen on Playbook

Web Works is actually exceedingly simple and gives you access to more device specific methods than a simple link to a webpage will.

New Contributor
Posts: 6
Registered: ‎02-20-2011
My Device: Not Specified

Re: Running web apps full screen on Playbook

Well, I suppose if you're already a Java developer who is familiar with Eclipse, then it's simple, and yes, like Phonegap, WebWorks opens up access to more of the built-in capabilities of the device, but for most business applications (which is my main focus), such things are generally overkill.

 

I'm not particularly suggesting an either/or, more of a "wouldn't it be nice to have the additional simple option" of an "Add to Homescreen" equivalent.  If nothing else it gets you up and running with a basic web app that has a native look and feel without any additional hassle, and it's then possible to consider whether or not the extra step of compiling to a true native app is really worth the effort or not.

 

Rob

Developer
Posts: 71
Registered: ‎02-04-2011
My Device: Blackberry Bold & Pearl
My Carrier: Telecom NZ

Re: Running web apps full screen on Playbook

You might be misunderstanding what WebWorks is, its a zip file that contains HTML and Javascript, just like a website, but kept offline. It's very similar to phonegap. No java knowledge required. 

 

RIM has said that the only apps that they will allow on the device are those that are submitted through their app world, my guess is that this includes online only apps.

 

I recall from the webworks seimnars that you can make an online app by simply zipping an XML file pointing to your URL and then compiling it. What you want can probably be done in a dozen lines of XML. Someone else can point you in the right direction I'm sure, but it will be something like:

 

 

<?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.3" rim:header="RIM-Widget:rim/widget">
  <name>Name</name>
  <description>Description</description>
  <author rim:copyright="2011">Me Myself/a</author>
  <icon rim:hover="false" src="icon.png"/>
  <icon rim:hover="true" src="icon.png"/>
</widget>

 

New Contributor
Posts: 6
Registered: ‎02-20-2011
My Device: Not Specified

Re: Running web apps full screen on Playbook

OK there's still a compilation phase which is presumably where Java comes in.  If it can be done without the need for Eclipse - ie via the command line - then I'd be OK with that and interested to explore.

 

Just to compare with the iOS mechanism - "add to Home Screen" doesn't create an app as such, it just does 2 things:

 

1) adds an icon (of the developer's choice) on your home screen that provides an automated shortcut to the URL of the web app

 

2) fires up Safari without any "chrome" so it runs full-screen when the icon is clicked.  With the kind of styling provided by a framework such as Sencha Touch, the result is something that looks like a Native App but which is actually a remotely-running web app.

 

There are no security issues as it's just a browser-based app running in the browser's sand-box, and no need for the extra overhead of submitting the app through an app store which can be useful to avoid at times.  

 

Apart from the chore of adding such a mechanism to the Playbook, I can't see any reason why Blackberry would be averse to such an addition.

 

Anyway, many thanks for the info!  Much appreciated

 

Developer
Posts: 71
Registered: ‎02-04-2011
My Device: Blackberry Bold & Pearl
My Carrier: Telecom NZ

Re: Running web apps full screen on Playbook

Theres no need to compile it with Java, and its all done with the command line, in fact I don't even have the webworks plugin, I use aptana. 

 

All you would need to do is put that config.xml file into a zip file along with the icon.png file and run

 

bbwp mywebsite.zip 

 

wala you will have a compiled application ready for signing and sending to RIM. 

 

I don't claim to know what RIM's plans are but they have stated that they want to keep the device closed and for applications to be installed only via blackberry app world, becaise the functionality to make these fullscreen website apps is so easy I would hazzard a guess that this is the only way to do it, but as I said I have no idea really.

Highlighted
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Running web apps full screen on Playbook

There has been talk in the past around allowing a chromeless shortcut.  So far, security has had a bit of an issue with it where people could create phishing attacks when a user can't see the URL bar of the website you are on.  

 

I'm not sure if they will be changing their minds on this topic or not.  When it's packaged in a webworks application you have it signed by the developer so if malicious things happen in the application there is tracability. 

 

You can also create a webworks application that simply does exactly what you are talking about without packaging any local content.

 

Simply whitelist "*" for the domains, and have the <content> element point to the URL of your website.  I understand that this doesn't have the simplicity of a chromeless browser icon, but it will yield the same end result.

 

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter