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

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

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

BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary

[ Edited ]


Thanks to everyone who continued to submit great questions during the Q&A period of the second installment from the BlackBerry WebWorks SDK for the PlayBook webcast series.  As promised, follow-up answers to some of the unanswered questions can be found below.
For your interest, archived versions of each Webcast from the series can be found here
Please let us know what you thought of the Webcast series!





Yesterday I created the Hello World app following your tutorial, but to return to the home screen I had to reset the virtual machine. Am I missing something simple?

To close an application on the Tablet OS, click on the bottom of the black bevel that surrounds the homescreen, and swipe up towards the center of the screen.



Its evident that RIM will not support AIR & Java. So what was the motivation for going with AIR.

The BlackBerry Tablet OS, which is built upon the QNX Neutrino microkernel architecture (one of the most reliable, secure and robust operating system architectures in the world), is a POSIX compliant OS.  This means it has immediate and strong support for runtimes like Adobe AIR.  Support for Java will definitly come at a later point in time (as announced at DevCon Asia).


There has been some conflicting information heard and seen about the size that app icon images should be(72px,90px,and 86px). Can you please specify now what the correct size should be?

Our recommendation is 72x72.  Can you pls identify where the conflicting information is coming from?

Corrected (Mar 1, 2010): Icons should be 86x86 in size.



Any news on the PlayBook medical category App approvals:  We submitted December 8 and NO word yet!

Please be patient as the App World team works through the overwhelming number of submissions.  Rest assured you will receive a response once your app has been reviewed.


Will there be an API to interact with BlackBerry Bridge?

Specific details about the capabilities of BlackBerry Bridge are not available as they have not been announced.


Any Oout of the Box support for JSONP, incase there is any restriction etc.

Yes, BlackBerry WebWorks applications do support JSONP since cross origin scripting is allowed.  You do need to whitelist the given domain in the config.xml document.


do I have control to set cache time of ajax request for offline use

Yes, the setRequestHeader("Cache-Control") method should be supported on BlackBerry 6 and BlackBerry Tablet OS.  Let us know of your progress!


Whats the point where one should evaluate developing a pure Java based app vs something on WebWorks? Since via AIR u can do almost anything ..so where does it stop ?

Great question!  This comes down to the requirements for features of the application.  If you find that in order to obtain the desired functionality in your app, you are implementing many JavaScript extensions, perhaps you should go with a pure Java app (for Smartphone side). 


What are main points in selecting either webwork or flex for appication dev

Go with WebWorks if you are looking to develop an app using open Web standards; and provide users with a standalone fully-featured application that has the opportunity to operate completely offline, as well as tie into the underlying platform (integration with hardware, data & services).


Will the developers be able to get hands on the PlayBook for performance optimalization before the official retail launch?

There are limited opportunities available, such as strategic partners who are members of the BlackBerry Alliance program.


Does the playbook device itself contain any type of accelerometer device?

Yes it does.  Check out Webcast #3 for more details into the DeviceMotion API as well as sample code.


Are there API''s in the WebWorks SDK that will allow me to build a location-based services app?  Can I use GPS or assisted GPS on the Playbook?

The Smartphone version of the WebWorks SDK does allow developers to leverage the Geolocation services of the BlackBerry Device Software (e.g. HTML5 geolocation or direct GPS).  This feature is not available on PlayBook simulator at this point in time.


is multitouch events supported in browser?

Yes it will be.


Does whitelisting solve cross-domain issues with client side jscript?

Yes it does.  Cross-domain XHR calls are allowed within the context of a WebWorks application, and once the target domain has been granted permission in the config.xml document, you will be able to make an asynchronous HTTP request for that resource.


are multo touch detection supported in javascript events?



Which software you use to manage web db, there was application displayed on one of the screens.

A great developer tool to use for profiling Web DB is the Web Inspector utility that is built into the WebKit rendering engine.  This is an easy to use tool that is conveniently exposed as a Tools option through the Google Chrome browser.  We are also working on providing developers with a tool that leverages Web Inspector to integrate with runtime debugging on a BlackBerry simulator (stay tuned!).


What about code security against reverse-engineering? Can users acces my code ?

Developers who are concerned about code privacy should consider using an obfuscation utility prior to packaging using the WebWorks SDK.


Windows 7 - could not connect to VMplayer - used tracert and ping to identify problem and found that VMware Virtual Ethernet adapter was not enabled by default. Have others had this probelm?

Have not heard of this issue before, however thank you for bringing this to our attention.  We will investigate further.


WebWorks supports OpenGL. Does that have its own Scripting API (javascript) or AIR?

WebWorks apps do not support OpenGL.


Can tethering be done via USB as well as Bluetooth?

Regarding pairing with the Smartphone, this is done via Bluetooth with the BlackBerry Bridge service.


what is the best approach to consume the .net web service? can I use ksoap?

Ksoap is a J2ME API which you can use if you write your own JavaScript Extension.  This will allow Smartphone applications (not PlayBook as extensions are not currently supported) to use KSOAP to speak with your backend web service.


how do you set the time on the playbook simulator?

Tap on the gear icon in the system tray to open the Options and select "Date" from the left menu.  Another easy way is to reset the Virtual Machine (which should synch the system time with that of your host PC).


Is the sandbox model applicable only for WebWorks or for all programming models? Is this a WebWorks SDK architecture decision or a univeral OS level one?

The sandbox referred to in this QA describes the security model enforced by the BlackBerry Tablet OS.


small tip on media queries : If developing for all devices, start making the page for the smallest screen and extend from there, this because the oldest browser on older phones don''t support media Queries, while all desktop and latest tablets/smartphones browsers do.

Great tip!


does whitelist work for ajax calls?

Yes, it is required.


Will the API introduce a way to ask for domain access instead of using star in the config.xml?

No, this type of feature is not currently being worked on.  If you'd like you can submit a feature enhancement request using the Developer Issue Tracker.


I had issues loading the 0.9.2 simulator.  freezes on the splashscreen.  Was able to load the previous simulator okay.  What is the best way to resolve

Make sure that the sim was configured to have 1Gb of memory.  Try restarting the virtual machine.


is webworks available for the torch devices and is it available for versions 5 and 6 of the Blackberry OS?

Yes, there is a WebWorks SDK for Smartphones as well and supports BlackBerry Device Software 5.0 and higher.


Are there any Cross Domain restrictions on the WebWorks Scripting capability?

No, you can make cross domain calls within a WebWorks application, as long as you have properly whitelisted all domains in the config.xml document


with webworks can you add a item to the menu in a native program example the browser or address book

This is possible in webworks applications running on Smartphones.  If you write a JavaScript extension that implements the necessary Java code to inject a menu item into these applications.  This feature is not available on PlayBook.


Does WebWorks support camera and barcode scanner (via ZXing) functions?

You can invoke the camera application from your WebWorks app.  There is currently no support for barcode scanning.


bar is  also a zip file. How i can restrict user to access the code?

Recommend developers who are concerned about code security obfuscate their code before packaging. 


Can you use the @media tags in CSS to handle rotating the PlayBook or the Torch?

Yes.  See WebCast #4 for a demo and code sample.


Will the WEB SQL DB stay after closing the application ?

Yes, data saved to Web DB persists after closing the application.


And what if you clear the cache of the browser, will this purge the WEB SQL DB ?

No, the memory managed by the browser application is independent of WebWorks apps.  Changing one does not affect the other.


Are the storage and other native hooks (e.g. camera) available for non-WebWorks apps (i.e. apps accessed through the PlayBook browser)?

Some are.  For instance, features provided through the HTML5 standard (Storage, Web Workers, etc) are supported by the WebKit rendering engine (which powers both a WebWorks app, and the native browser).  However the custom WebWorks APIs are only available within the context of a WebWorks app.


is it possible to use the playbook api''s on a webpage

Yes, but only if that Webpage is loaded from within your WebWorks app, and if you have setup the proper whitelisting of the page's domain and the feature it is trying to access.


wil lthere be a full document on the supported CSS3/ HTML5 features of the Play Book ? html5test gets us only so far.

Yes, see the "HTML Reference Guide" published in the browser documentation section of BlackBerry developer zone website.


Has anyone considered using gwt. UI designer is bundled with latest eclipse.

We do not officially support GWT, however welcome feedback from the developer community about their own success and experience in using this framework


Would re-packaging an existing website ("mygreatsite.com") become an app in AppWorld?  Why wouldn''t someone just use the browser to access the content?

Not necessarily.  The WebWorks SDK allows you to transform that content into a fully-featured standalone application though the use of APIs that allow you to integrate your Web content with the underlying (PlayBook) platform.  This standalone application can continue to retrieve live resources from an online Website, or function as a completely 'offline' app.  If you are not looking to provide this experience, then it may make sense to continue publishing content on a Web server.


I keep getting the error "Username or password is invalid or not specified or time on the device is out of sync" in the simulator. Even though the password is set and the time matches the computer. Any ideas?

Confirm that you are using the latest versions of BOTH the simulator and Tablet OS SDK (currently 0.9.3).  Otherwise, reset the virtual machine (from the VMWare menu) to synchronize the times.


@Appworld. Which countries are going to have the playbook after initial launch

Focus of initial launch is North America, with International distribution to follow later.


How are assets protected from copying from devices, does packager encrypt webapps in some way.

No, any type of encryption / obfuscation will need to be performed explicitly by the developers.  The installing and deleting process for managing applications on PlayBook are handled by App World.  End users should not be able to "see" the contents of your BAR file.


Why are files zipped with the Windows built-in application recognized by the CLI tool?

Both formats are supported.


Which mouse events will be available? In particular: Doubleclick event & Multitouch?

All standard mouse events will be supported, however hover events such as "onmouseover" are not supported on Touch Screen devices (or at least do not behave as expected).


You guys have a Maven / Ant sample process available?

Not yet, but this should be something we'd like to provide as a knowledge base article, depending on demand.  Let us know if you have any ideas.


why does my jquery mobile app not have slide transitions like it does on ipod

Could be a defect with how these transitions are being rendered.  Recommend submitting a defect through the issue tracker, and we can work with the jQuery folks to ensure this is functional as expected.


does the playbook have a map application?

The PlayBook simulator currently does not have a map application.


Given that you can''t manitpulate native applicatoins to the playbook, does this mean that my app that would take advantage fo the device calendar can''t place information on the calendar?

Correct, there is no Calendar application on PlayBook, so existing applications that leverage this capability will need to be modified in order to successfully be deployed and run on PlayBook.  Recommend providing an alternative user experience with the same app for this feature, rather than choosing not to support the platform due to a missing API.


What''s the process for connecting to existing dynamic content in a mysql database?

Recommend running your MySql DB on a Web Server, and provide a Web interface (e.g. a page that displays DB content, or Web servces) and make calls to that interface from your WebWorks application


bring up keyboard on non input fields?

As far as I know, there is currently not a way to programatically invoke the virtual keyboard.  The keyboard is opened automatically when focus is applied to user input fields.


is there an integration available with the Netbeans IDE?



I have an application pulling an embedded youtube video in an iframe but if I replace the content using innerhtml the entire application crashes on the playbook simulator.  This same application on a desktop works just fine. Any idea why this happens?

Flash support continues to improve with each version of the Simulator Beta that is being published.  Expect this experience to get better with new versions of the simulator.


How much memory do we have at our disposal if saving local content?

Most user agents, including the BlackBerry WebKit engine, allocate 5Mb of space for this type of storage.


Is it OK to lock screen orientation for an App, or do you HAVE to support rotation (like on the iPad)

You have to support orientation, as this behaviour is provided by the Tablet OS.  There is currently no way to "lock" the screen orientatoin.


Can we use widget config.xml in eclipse to generate config.xml to be used by plabybook app?

Perhaps.  Some elements that can be configured using the WebWorks Plug-in for Eclipse are not supported by the WebWorks SDK for PlayBook.  However you can certainly try.


In the next video, will we deal with form submission and data handling?

Great idea.  I will add a slide to Webcast #4


Must one explicitly call "local://" inorder to call a local file?

It depends on the context.  If you are already rendering a local page, then no you can leave this out.  However if you are loading a remote webpage, that tries to load local images, you will need to specify the "local:///" protocol.


I''m having trouble loading the ajax sample code.  "Origin null is not allowed by Access-Control-Allow-Origin" in Chrome.

This is because desktop browsers, like Chrome, do not support cross site scripting.


I read innerHTML doesnt take events...could you please explain a little more

innerHTML is a simple way of injecting HTML into the page.  It should not be used for registering page events.


how to share the information between 2 apps?

Currently this is not possible on PlayBook.


What is best way to debug javascript, etc when running on the simulator?

While running on the simulator, recommend including debug statements (alert or debug code) in your apps to profile it.  Another option is to build a unit test page into your app that can be run from the simulator.  There is currently no integrated debugging support with WebWorks apps running on the simulator.


I found chrome currently be more compatible with the PlayBook / and/or safari. FireFox has no WB SQL.

Correct.  Firefox uses its own rendering engine, while Chrome and Safari are built on WebKit (as is the BlackBerry Tablet OS and BlackBerry 6)


Lock the orientation of the application (e.g. landscape or potrait.) how ?

This is currently not possible.


Is it possible to embed flash content if so, is it just the standard embed tag? Say for a flash video player.

Yes that is correct.


Is there a way to tell if my Webworks App is running on a Playbook vs. a Blackberry Phone for purposes of what API calls I can use? Or do I need to have two separate code bases?

Yes, see webcast #4 "Error handling" for tips on how to do this.  Recommend checking whether an API is supported before using it.  This flexibiility allows you to build content that will run on both Smartphone and PlayBook without runtime errors.


Is there a list of webworks API extensions to BB phone features

Yes, see the "WebWorks API Reference" guides for both the WebWorks SDK for Smartphone and WebWorks SDK for PlayBook.


Is Perl programming supported?

Not natively on the device.  You can certainly leverage Web content generated by Perl scripts, that are deployed on a web server.


What are the salient differences between WebWorks on 5.0 versus 6.0 firmware smartphones?

Major upgrade in Web content support.  BlackBerry 6 introduced the WebKit rendering engine which is faster, and supports standard Web content better.  Gears APIs (part of OS 5.0) have been deprecated and replaced with equivalent HTML 5 APIs


Does SQLite reside on memory or does it reside on memory card - or is there memory card on Playbook - question is more about  storage or browser cache in Webkit?

No memory card on PlayBook.  It is saved in memory.


You stated accepted apps submitted will become eligible for a playbook I guess that means one does not necessarily mean one is getting a playbook

Correct - read the terms and conditions of the PlayBook offer for full details on eligibility.


How forward compatible are WebWidgets for 5.0 to WebWroks on 6?

The WebWorks SDK for smartphone allows you to build a version of your application that will run on both Device Software 5.0 and BlackBerry 6.  The major differences between the two platforms are the Web standards supported.  For example, Gears APIs are available in OS 5.0 but not in BlackBerry 6 (where they have been replaced with their HTML5 equivalents) and vice versa.


Is there an ETA for application signing process?

No, but we will certainly let our developers know immediately when this is ready.


When I try playing a flash video in the simulator it looks choppy, is the simulator completely accurate on how my video will look or will the device be much better?

Flash support will continue to improve over time.  Stay tuned.


when will packager be released for linux also?

There are no plans to provide a Linux version of the WebWorks SDK for PlayBook.


How is OpenGL supported with WebWorks?

It is currently not.


any plans to offer support for mono (.net) given that platform is Linux/QNX

No plans at this point in time.



My Simulator is reporting IP Address:<,no interfaces available>, Can you suggest what the problem may be?

Can you confirm that you are using the latest version of both the simulator and the Tablet OS SDK?  As of Feb 9, this is version 0.9.3


Is it possible to take a screenshot within our PlayBook application?

There is not a screenshot feature at this point in time.


Will position:absolute work - unlike in other mobile WebKit browsers?

It might, however we strongly recommend against using absolute positioing.  Doing so requires a full page repaint for the smallest scroll amount (even 1 px).  This results in bad performance, and therefore we encourage our devs to stay away from this if they can.


What kind of support does the Playbook for Location Based Services?

There have been no details anounced about Location Based Services (GPS, Maps) for PlayBook.



Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary


astanley wrote:

 There has been some conflicting information heard and seen about the size that app icon images should be(72px,90px,and 86px). Can you please specify now what the correct size should be?

Our recommendation is 72x72.  Can you pls identify where the conflicting information is coming from? 


The "conflicting information" comes from your own published documentation.


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!
New Developer
Posts: 64
Registered: ‎01-14-2011
My Device: Priv, 9810, PlayBook, 9000, 8820
My Carrier: AT&T

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary - Application Icon Sizing

As Peter points out, the current UI Guidelines documentation states that application icons should be 86x86 pixels in size, at 72 PPI.


A previous version of the same doc (a copy of which I stil have) lists the same information, but with a 90x90 pixel size.


Now, the above "recommends" 72x72.


It's a little hard to trust any of these numbers while they continue to publicly disagree.  And since this is potentially an important detail to submitting a PlayBook app to App World, can we them all agreed on a final ruling as to the correct application icon size, so we know what we're doing?  And what are the icon-size requirements vs. recommendations vs....


And, does the UI Guideline doc's reference to "use rounded rectangles with a corner radius of 20 pixels" mean that the icon itself will render with a rounded-corner mask, or that we are requested or required to round our icon's corners so (so it's actually a 86x86 (or whatever) icon with 20-pixel rounded corners), or...?



Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary - Application Icon Sizing

@Thogek, can you check your facts or edit your post?  Nowhere has "72x72" been recommended, that I'm aware of... was that a typo?

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!
Posts: 382
Registered: ‎05-19-2008
My Device: BlackBerry Torch
My Carrier: AT&T

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary - Application Icon Sizing

72x72 is the reccomendation from astanley on the WebWorks webcast and summarized in this post.

Check out my book on BlackBerry Development for Java.
And my other really really old book
My Apps: FlashKids
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary - Application Icon Sizing

Ah, I should have checked back.  I thought the "above" reference was referring to one of the two links that came just above.  Thanks, Bill.

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!
Posts: 42
Registered: ‎01-18-2011
My Device: PlayBook

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary

[ Edited ]

So can we please get a clarification of which icon size to follow? 72x72 or 86x86. Smiley Sad

Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary

+1 for the concept of RIM speaking with one voice on this now very old issue.

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

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary

Hi folks,


Thanks for bringing this to my attention.


I must make a correction my previous post: the correct size for PlayBook application icons is 86 x 86 (and not 72x72 as previously indicated).


Sincere apologies for any confusion,


Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Regular Contributor
Posts: 60
Registered: ‎03-07-2011
My Device: Not Specified

Re: BlackBerry WebWorks SDK for PlayBook - Webcast #2 Q&A summary

The HTML Reference Guide you cite above is listed next to a list of Javascript APIs that the Blackberry Browser supports.  Are those APIs available to us to develop Playbook apps, or is just the much shorter list of Javascript APIs you reference in the Webcast?