Professional Documents
Culture Documents
interactive wallpaper that users may choose to run as part of their home page
Live Wallpaper
2.1 (API Level 7)
is a wallpaper (a
background set on the home screen) that may be animated and enabled for interaction
LiveWallpaperService
example
live wallpaper that is touch-enabled and utilizes
the Internet (via the Yamba Manager) in order to place some text at the point of
touch
Manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.marakana.android.yamba">
<application>
<service
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:name=".YambaWallpaper"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action
android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="@xml/wallpaper" />
LiveWallpaper Service Resource XMLres/xml
//To achieve a simple animation effect, we’ll be drawing on a canvas. The wallpaper
will
// display recent Yamba status updates, and we’ll interact with the user by letting
her choose where on the screen the updates should appear
//drawing and animation in general are beyond the scope
//primary class, extending the base class WallpaperService