January 17, 2021
Hot Topics:

Testing Live Android Wallpapers, Page 2

  • By Shane Conder & Lauren Darcey
  • Send Email »
  • More Articles »

Testing the Live Android Wallpaper

If you've done everything right, then when you press and hold on the wallpaper of your home screen (at least, in Android 4) you'll get the following dialog.

Android Live Wallpaper
Click here for larger image

Figure 1. Android Wallpaper Dialog on Home Screen

After that, you'll get a list of all the live wallpapers available:

Android Live Wallpaper
Click here for larger image

Figure 2. List of All Available Android Wallpapers

And then an animated preview, when you choose Stars.

Android Live Wallpaper
Click here for larger image

Figure 3. Animated Preview of Stars Android Wallpaper

Android Interactive Wallpapers

Live wallpapers can receive touch events and react to them. In the context of using the helper classes introduced above, simply override the onCommand() method of RenderScriptScene, look for the WallpaperManager.COMMAND_TAP, and take some action based on the position of the tap. Although this is beyond the scope of this tutorial, the code download includes a little extra for readers to enjoy.


You've learned how to create a simple Android live wallpaper. While doing so, you've also learned about some of the benefits of open source projects, and a fast method of creating a RenderScript-based wallpaper. Can you modify the script to make colored stars? Make the stars float towards you? Let us know what awesome live wallpapers you've created!

About the Authors

Shane Conder Shane Conder and Lauren Darcey--Contributing Editors, Mobile Development--have coauthored two books on Android development: an in-depth programming book entitled Android Wireless Application Development (ISBN-13: 978-0-321-62709-4) and Sams Teach Yourself Android Application Development in 24 Hours (ISBN-13: 978-0-321-67335-0). When not writing, they spend their time developing mobile software at their company and providing consulting services.

        Email        |        Blog        |        Twitter

Lauren Darcey

Originally published on https://www.developer.com.

Page 2 of 2

This article was originally published on January 25, 2012

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date