1

I used to be able to set a wallpaper bitmap without scrolling using this (incorrect) code below:

int deviceWidth = ...;
int deviceHeight = ...;
Bitmap bmp = new Bitmap(deviceWidth, deviceHeight);
...

WallpaperManager wm = WallpaperManager.getInstance(context);
wm.setWallpaperOffsetSteps(1, 1);
wm.suggestDesiredDimensions(deviceWidth, deviceHeight;
wm.setBitmap(bmp);

but the developer docs now point out that we shouldn't be calling suggestDesiredDimensions() unless we're a homescreen replacement app. Which I'm not. And this doesn't work on my nexus 5 either.

After searching through SO posts, it seems like the recommended way to create a wallpaper that doesn't scroll is to add Live Wallpaper support to your app. You can set your live wallpaper up to not scroll. See the last answer for setting it programmatically here:

Setting live wallpaper programmatically

Is this the right way to do it, or am I missing a much simpler way to go about this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
user3203425
  • 2,919
  • 4
  • 29
  • 48

1 Answers1

0

The only 100% working workaround is making a LWP.

It's not too hard and gives much more flexibility than static wallpapers. But also some imitations(ex. you can't set LWP programmatically, only open LWP picker and promt user to set it)

Sam
  • 1,652
  • 17
  • 25
  • Crazy, I wonder why google makes it so awkward. The second answer here suggests that you can programatically set the LWP in 15 and above?: http://stackoverflow.com/questions/4831499/setting-live-wallpaper-programatically – user3203425 Feb 10 '14 at 15:01
  • It doesn't. It suggests you can open LWP picker with your wallpaper component ready to be set(means user should not search through the list of LWPs for your LWP name and click it) – Sam Feb 10 '14 at 15:03