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
mugil
Posts: 6
Registered: ‎02-19-2013
My Device: BlackBerry 9320
My Carrier: BlackBerry

how to listen to the DeviceReady event in Blackberry

how to listen to the DeviceReady event in Blackberry?

Please use plain text.
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: how to listen to the DeviceReady event in Blackberry

Check the WebWorks getting started doc, they have an example HTML page with listeners.
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Please use plain text.
BlackBerry Development Advisor (Retired)
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: how to listen to the DeviceReady event in Blackberry

You won't currently use deviceready in WebWorks like you would in PhoneGap. The event is called "webworksready" and you can listen to it by doing the following:

 

window.addEventListener("load", function(e) {
         document.addEventListener("webworksready", deviceready);
      }, false);

You can see more here: http://developer.blackberry.com/html5/documentation/creating_a_bb10_app_2007539_11.html

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.
New Contributor
mugil
Posts: 6
Registered: ‎02-19-2013
My Device: BlackBerry 9320
My Carrier: BlackBerry

Re: how to listen to the DeviceReady event in Blackberry

It is for BB10 webworks right? could you pls help me for BB Smartphones 7 and earlier..
Please use plain text.