Processing Live Wallpapers

edited December 2017 in How To...

I want to create a live wallpaper using processing that I can publish to the Google Play Store. The problem that I'm having is that if the user sets the live wallpaper then changes their screen resolution in the settings or turns on power saving mode, the images used in the live wallpaper change size, they either get dramatically bigger or smaller. I can't use displayDensity or anything because it looks like once the wallpaper is set, it just uses the same numbers over and over. The user actually has to set the wallpaper again in the settings to actually change the numbers of displayDensity to the current ones.

Answers

  • I found out how to resolve this problem. Instead of using displayDensity I hardcoded it myself by finding out how displayDensity works.

    I used this in my void draw() method:

    if(displayWidth >= 1440) { density = 4; } else if(displayWidth >= 1080) { density = 3; } else if(displayWidth >= 720) { density = 2; } else { density = 1; }

Sign In or Register to comment.