Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

22. Extending Android Application Reach > Creating a Live Wallpaper

Creating a Live Wallpaper

A live wallpaper is similar to an Android Service, but its result is a surface that the host can display. You need to make the following changes to your application in order to support live wallpapers:

• Provide an XML wallpaper configuration.

• Provide a WallpaperService implementation.

• Update the application Android manifest file to register the wallpaper service with the appropriate permissions.

Now let’s look at some of these requirements in greater detail.


Image Tip

The code examples provided in this section are taken from the SimpleLiveWallpaper application. The source code for this application is provided for download on the book’s websites. If you’d like more examples, including ones that use RenderScript for fancier graphics, check out the open source code here (http://code.google.com/p/android-dc-tutorial-projects/source/browse/#svn%2Ftrunk%2FStarsLiveWallpaper or http://goo.gl/NXODt) and here (http://code.google.com/p/android-mt-tutorials/source/browse/#svn%2Ftrunk%2FFallingSnow or http://goo.gl/DoPgc) that we’ve provided.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial