O'Reilly logo

OpenGL ES 2 for Android by Kevin Brothaler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing the Live Wallpaper Service

To implement a live wallpaper, we’ll use an Android service, which is a special type of application component that can be used to provide features to the rest of the system. Android provides the base live wallpaper implementation with WallpaperService, and to create a live wallpaper, all we need to do is extend this base class with our own custom implementation.[69]

Extending WallpaperService

Let’s start off by creating a new package called com.particles.android.wallpaper. In that new package, let’s create a new class called GLWallpaperService as follows:

LiveWallpaper/src/com/particles/android/wallpaper/GLWallpaperService.java
 
public​ ​class​ GLWallpaperService ​extends​ WallpaperService {
 
@Override ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required