0

I know I have to use this code: HomeScreen.setBackgroundImage(Sring uri) to set the wallpaper from an image in my app, but what would I type for the string url? I have the image in my app and as of yet I am not using persistent storage. So question #2 is, do I have to put the image in persistent in order to use it as the wallpaper?

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
Joey John John
  • 243
  • 2
  • 11

1 Answers1

0

Check this link, setBackgroundImage, it describes typical format of an URI.

Sets the background image for the home screen. Must be an image file residing in flash memory or SD Card. Typical format for the URI would be "file:///store/home/user/pictures/file.jpg".

Rupak
  • 3,674
  • 15
  • 23
  • would that path be the same for testing on the simulator? What would the path be for an image I have in my app, and not on the phone – Joey John John Apr 24 '12 at 07:41
  • `Must be an image file residing in flash memory or SD Card` - I don't think it is possible to use image from the application resource folder. But it may be possible to write an image from resource folder to SD Card or flash memory, then the image can be used. For SD Card, the URI prefix will be `"file:///SDCard/...`. Check this link `How to Read, Write and Copy file in Blackberry`, http://blackberry-tips-bikas.blogspot.com/2009/07/how-to-read-write-and-copy-file-in.html. – Rupak Apr 24 '12 at 07:53