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
Highlighted
New Developer
Posts: 2
Registered: ‎06-01-2012
My Device: BlackBerry Dev Alpha 10
My Carrier: Simyo
Accepted Solution

App Cover / App Frame in webworks?

Hi,

 

Does anybody know if App covers (QNXCover in native world) are available in Webworks and how tow use them?

 

An example would be greatly appreciated.

 

For app covers, I mean the app screen when the app is minimized and show in the homescreen of BB10, like in the first screenshot here:

https://developer.blackberry.com/devzone/design/notifications.html

 

Iv'e only found examples / api for Air and C++, but nothing for Webworks:

https://github.com/blackberry/Samples-for-AIR/tree/bb10/ActiveFrameSample

https://developer.blackberry.com/air/apis/bb10/qnx/system/QNXCover.html

 

Thanks in advance!

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: App Cover / App Frame in webworks?

Active frame support is planned, but it's not implemented yet. 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 9
Registered: ‎03-06-2013
My Device: Z10
My Carrier: Wind

Re: App Cover / App Frame in webworks?

Hey Tim,

 

Has there been any movement on this? Not seeing anything in the repo and seems like it's a 'no' but I'm just looking to confirm. 

 

Thanks, 

Jay

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: App Cover / App Frame in webworks?

Voila Smiley Happy

 

http://developer.blackberry.com/html5/apis/blackberry.ui.cover.html

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 9
Registered: ‎03-06-2013
My Device: Z10
My Carrier: Wind

Re: App Cover / App Frame in webworks?

Beauty, thanks Tim!

Developer
Posts: 178
Registered: ‎03-10-2011
My Device: Not Specified

Re: App Cover / App Frame in webworks?

[ Edited ]

Only supports image and label? If I want to update content in active frame window, I have to prepare the content in a canvas area, convert that canvas to a PNG file, save in file system, and send to active frame? 

 

The method:

 

blackberry.ui.cover.setContent(blackberry.ui.cover.TYPE_IMAGE, {
    path: <path to the photo>
});

 

Does path accept data URL format? path: data&colon;image/png;base64,iVBORw0KGgo...... so I don't need to request for permission to access file system in order to save the temporary PNG image.

 

 

 

 

Developer
Posts: 178
Registered: ‎03-10-2011
My Device: Not Specified

Re: App Cover / App Frame in webworks?

tested and data URL format does not work for active frame... have to convert the canvas to png file, save in local share folder and then pass the full path to active frame --

 

this means app needs to request for additional permission unop first-time running, sometimes the permission request may mislead users: they are wondering why for example a calculator app needs to access documents, music, video... folders.

 

I am trying to avoid any unnecessary permission request but in order to get active frame working, I seem to have no choice here...

 

 

Developer
Posts: 101
Registered: ‎06-14-2010
My Device: Passport
My Carrier: Virgin Mobile Canada

Re: App Cover / App Frame in webworks?


sh2sg wrote:

tested and data URL format does not work for active frame... have to convert the canvas to png file, save in local share folder and then pass the full path to active frame --

 

this means app needs to request for additional permission unop first-time running, sometimes the permission request may mislead users: they are wondering why for example a calculator app needs to access documents, music, video... folders.

 

I am trying to avoid any unnecessary permission request but in order to get active frame working, I seem to have no choice here...

 

 


If you managed to get this working, can you post what permissions you needed to ask for? I'm getting errors when my app tries to save the file (I've posted a separate topic on adapting the canvasToFilesystem sample code).

Developer
Posts: 178
Registered: ‎03-10-2011
My Device: Not Specified

Re: App Cover / App Frame in webworks?

followings need to be declared in config.xml (I am using WebWorks 1.0, it may look different in WebWorks 2.x)

 

<feature id="blackberry.io" required="true" version="1.0.0.0" />
<feature id="blackberry.ui.cover" />

<rim:permissions>
    <rim:permit>run_when_backgrounded</rim:permit>
    <rim:permit>access_shared</rim:permit>
</rim:permissions>