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

Posts: 15
Registered: ‎03-16-2014
My Device: Z30
My Carrier: O2
Accepted Solution

Window Covers

Hello guys!


I did the following things but covers doesnt seem to work. Am i missing something?


1. webworks plugin add com.blackberry.ui.cover

2. added "<feature id="blackberry.ui.cover" required="true" version="" />" to config.xml

3. added events in my app using

blackberry.event.addEventListener("entercover", function() {


document.addEventListener('enterCover', function() {


Debugged it using Web Inspector but none of the events got called. So whats going on here? Any Idea?

Posts: 15
Registered: ‎03-16-2014
My Device: Z30
My Carrier: O2

Re: Window Covers

just found out that it works when the www-folder is deployed with the app and not served using a webserver.

Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Window Covers

You shouldn't need #2; the necessary features are added when you include the plugin (assuming WebWorks 2.0+)

The exception is if you want to use WebWorks APIs on a remote location, you will need to white-list them manually inside of an <access> element. You can see an example here:

Note that you still need to package/deploy the application to your device, but this way you can host the files externally and modify them on the fly, and still get access to WebWorks APIs. WebWorks APIs won't work outside of an application container (i.e. in the default browser.)

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.