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

New Contributor
Posts: 3
Registered: ‎02-04-2013
My Device: BB10 DEV Alpha VMWare Simulator
My Carrier: BB10 Dev Alpha Simulator

OnDeviceReady event is not firing in BlackBerry sencha app

Hello ,


I have creted a sencha touch2.0 based application that uses Salesforce. It is compatible with BlackBerry 7.0(Model : BlackBerry9810).
I am using BlackBerry WebWorks . Now due to certain reason(Like handling Back button and trap the Keyboard show/hide events) i need to add phonegap 2.4.0.js file.
When I am debuging application on my device then ondeviceReady event didn't get fire. So basically i am not able to use phonegap with this app.


New Developer
Posts: 10
Registered: ‎02-08-2012
My Device: Blackberry Playbook 2.0
My Carrier: WIND

Re: OnDeviceReady event is not firing in BlackBerry sencha app

Not sure if you've tried this already, but instead of ondeviceready, use document.ready(). This ensures your DOM is ready before the code is executed.

Building amazing things with limited tools is my job.
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: OnDeviceReady event is not firing in BlackBerry sencha app

ST2 itself is checking for ondeviceReady, as long as you've included phonegap in your app.json, but you'll need to use Sencha cmd to package your app prior to packaging it with Webworks.

Check out this blog post by one of the brains behind ST2:


Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.