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
Contributor
Korgano
Posts: 13
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="1.0.0.0" />" to config.xml

3. added events in my app using

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

or

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

 

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

Please use plain text.
Contributor
Korgano
Posts: 13
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.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
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:
https://developer.blackberry.com/html5/documentation/v1_0/accessing_external_resources_webworks.html

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.
Please use plain text.