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
Developer
TheFlowFX
Posts: 166
Registered: ‎02-15-2012
My Device: Playbook 16GB
Accepted Solution

Change Wallpaper onClick

Can anyone let me know if Im doing this right. Im using bbUi and I have a button when clicked does this:

 

onclick="blackberry.system.setWallpaper('images/sampler.png');"

 Also in my config.xml file I have declared:

  <content src="index.html" rim:allowInvokeParams="true"/>
 
  <feature id="blackberry.ui.dialog"/>
  <feature id="blackberry.system" />
  <feature id="blackberry.app">
    <param name="mode" value="portrait" />
  </feature>
 
  <feature id="blackberry.app">
  </feature>

 

When testing on the device, nothing happens when Apply is pressed.

 

Anyone got a solution?

 

Regards,

Flow

If any post helps you please click the Like Button below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 620
Registered: ‎10-01-2009
My Device: Z10

Re: Change Wallpaper onClick

I believe you have to pass in a protocol before the path.

 

Try this

 

onclick="blackberry.system.setWallpaper('local://images/sampler.png');"

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.