Tutorial: Live Wallpaper in Android Studio - processing/processing-android GitHub Wiki

For information on how to set up the wallpaper, check out another tutorial like this one. This tutorial only shows how you tell your WallpaperService class to load Processing.

// Make a new class that extends PWallpaper. 
// PWallpaper is a processing class that extends WallpaperService, 
// so you are going to be able to reference this class
// in your xml files etc.
public class Wallpaper extends PWallpaper {
    
    // Override the createSketch() function and return your sketch class.
    @Override
    public PApplet createSketch() {
        return new Sketch();
    }

}
public class Sketch extends PApplet {

    public void settings() {
        fullScreen(); // This is (kind of) important for wallpapers!
    }

    public void setup() {
        // ...
    }

    public void draw() {
        // ...
    }
}