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: 4
Registered: ‎05-09-2013
My Device: Q10
My Carrier: Rogers
Accepted Solution

Sencha Touch 2 w/ Push Notifications

Hey all,


I'm new to the BlackBerry development world and am confused about some things. I'm trying to develop an app using Sencha Touch 2 but I need it to have Push Notifications. I understand this is something that can be done through the WebWorks API but I was under the impression that you could either use the WebWorks framework or Sencha Touch 2 framework; they were mutually exclusive.


I recently read a forum post that would seem to contradict this, somebody had integrated features from the WebWorks API into their Sencha Touch 2 project. Could somebody give me a quick idea of how exactly you do this?



Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Sencha Touch 2 w/ Push Notifications

Welcome! Smiley Happy


Look at WebWorks like an extra set of APIs you can use to build apps that require access to the hardware or the BlackBerry services.


So you build your app in Sencha Touch and whenever you need to have access to something specific to the device, you simply make calls from within your app, just like you would call a Sencha Touch method.

It's similar to how you would add external libraries to a Sencha Touch app, because the SDK doesn't provide a component that you need. 

Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
New Contributor
Posts: 4
Registered: ‎05-09-2013
My Device: Q10
My Carrier: Rogers

Re: Sencha Touch 2 w/ Push Notifications

Thank you so much for the reply!


I've taken your advice but I am still encountering some issues.


I've been trying to add Push Service support to a Sencha Touch 2 BB10 app. I've been following this example here:
and referencing this:
However, the moment I try to use any WebWorks call the app becomes frozen (white screen) when deployed to the simulator/emulator/device. These are the most relevant code sections:

<rimSmiley Tongueermissions>
 <rimSmiley Tongueermit>post_notification</rimSmiley Tongueermit>
 <rimSmiley Tongueermit system="true">_sys_use_consumer_push</rimSmiley Tongueermit>
</rimSmiley Tongueermissions>
<feature id="blackberry.app" />
<feature id="blackberry.push" version="1.0.0"/>
<feature id="blackberry.system" />
init: function() {
 var ops = {
                invokeTargetId : TARGET_ID_PUSH,
                appId : APP_ID,
                ppgUrl : PPG_URL
        blackberry.push.PushService.create(ops, this.successCreatePushService, this.failCreatePushService,
                              this.onSimChange, this.onPushTransportReady);

I get the following message in Ripple & BB Simulator 'Cannot read property 'PushService' of undefined' so clearly the blackberry.push API is not visible in the app.
What could I be missing here?
Thanks for any help you can provide!
New Member
Posts: 1
Registered: ‎09-29-2013
My Device: 9900, z10
My Carrier: rogers

Re: Sencha Touch 2 w/ Push Notifications

This is so typical, questions without answers.