0

In Android there is a very convenient way of getting the user to choose and set a live wallpaper.

Intent intent = new Intent(WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER);
startActivity(intent);

Is there a similar way for user to choose and set a wallpaper instead (or better yet, allow them to choose wallpaper/live wallpaper/gallery)?

Thanks!

Lim Thye Chean
  • 8,704
  • 9
  • 49
  • 88

2 Answers2

1

Try this:

private void chooseWallpaper() {

final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
Intent chooser = Intent.createChooser(pickWallpaper, getText(R.string.chooser_wallpaper));
startActivityForResult(chooser, REQUEST_PICK_WALLPAPER);
}
tianwei
  • 1,859
  • 1
  • 15
  • 24
0

Try this

public void setIt(){

Context c = this.getBaseContext();
Bitmap bp = BitmapFactory.decodeResource(getResources(), "your_array");
c.setWallpaper(bp);
}
Dushyant Patel
  • 687
  • 8
  • 20
  • Not sure whether I get you - WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER allows user to choose an available live wallpaper, I am looking for a way to choose an available wallpaper (not creating my own). – Lim Thye Chean Mar 14 '14 at 06:21