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
New Contributor
Posts: 5
Registered: ‎10-16-2012
My Device: z
My Carrier: HamRadio
Accepted Solution

How do I perform "Set as Wallpaper" using JavaScript

Hello,

 

Please help…

 

How can I set an image as device's (Playbook and Dev Alpha) background using JavaScript?  

 

Currently these devices have "Set as Wallpaper" function from the picture gallery.  I want to do the same thing using JS.

 

Thank you in advance.

 

Cheers, Tek

 

 

Retired
Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: How do I perform "Set as Wallpaper" using JavaScript

Hi tekboo,

 

This feature is not yet available in the WebWorks APIs. For more information on the roadmap and currently released APIs please visit https://developer.blackberry.com/html5/

BlackBerry Development Advisor
Posts: 137
Registered: ‎01-19-2010
My Device: BlackBerry Z10
My Carrier: AT&T

Re: How do I perform "Set as Wallpaper" using JavaScript

Hi Tek.  There is actually a community extension that does this exact thing.  Please check out:

 

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10/screen

 

Ken Wallis - Senior Product Manager, WebWorks and Android Runtime
@ken_wallis
New Contributor
Posts: 5
Registered: ‎10-16-2012
My Device: z
My Carrier: HamRadio

Re: How do I perform "Set as Wallpaper" using JavaScript

This is great! Thank you Ken.

 

Cheers, Tek

BlackBerry Development Advisor
Posts: 137
Registered: ‎01-19-2010
My Device: BlackBerry Z10
My Carrier: AT&T

Re: How do I perform "Set as Wallpaper" using JavaScript

Of course, this one will work only on BlackBerry 10, but you can use it as inspiration to create your own Air-based extension for PlayBook (though I am not sure whether or not it is possible on the Air platform for PlayBook, you might have to go further to develop an Air Native Extension...)

Ken Wallis - Senior Product Manager, WebWorks and Android Runtime
@ken_wallis
Highlighted
New Contributor
Posts: 5
Registered: ‎10-16-2012
My Device: z
My Carrier: HamRadio

Re: How do I perform "Set as Wallpaper" using JavaScript


kwallis wrote:

Of course, this one will work only on BlackBerry 10, but you can use it as inspiration to create your own Air-based extension for PlayBook (though I am not sure whether or not it is possible on the Air platform for PlayBook, you might have to go further to develop an Air Native Extension...)


Hello Ken,

 

Thank you for your replies.

 

Perhaps another way to accomplish this feat for the PlayBook is to have the main app invoking a simple C/C++ program to set the background.   ??

 

On a related question:

Do you know if  BB10 will have home screen rotation like the PlayBook or just only Portrait mode that is currently on the Dev Alpha?  Am asking of this because it may affect the way wallpapers are positioned on the screen.

 

Cheers, Tek