2

i'm new at live wallpapers. Is it possible to link a live wallpaper to an app with it's own engine? I mean, to avoid using the typical "Live wallpapers settings" where you choose the amount of items (mostly fishes xD), that you want in the wallpaper. I'd like to have my own app to manage the content of the live wallpaper. Would that be possible? If answer is yes, i'd be helpful if you told me how to do it.

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
Lucas
  • 21
  • 1

2 Answers2

5

I don't think Hackbod understood your question. If you want to place your live wallpaper settings in an app instead of in the preferences button on live wallpaper preview, you can do that.

First, you must set your application to be a live wallpaper and a regular application at same time. So your manifest should have these two parts:

<activity ...>
    <intent-filter >
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity> 

and

<service android:name="..." android:permission="android.permission.BIND_WALLPAPER">
    <intent-filter android:priority="1">
        <action android:name="android.service.wallpaper.WallpaperService" />
    </intent-filter>
    ....
</service>

Second you should persist user settings changes made in your app (you can use SharedPreferences) and update your live wallpaper behavior on your WallpaperService.Engine callbacks (like onVisibilityChanged or whatever makes sense for you).

Rodrigo Dias
  • 412
  • 4
  • 13
  • Yes, both share the same preferences hence onSharedPreferenceChanged() in the wallpaper engine should pick it up... – Lumis Jun 03 '12 at 13:11
1

Sorry, the live wallpaper is global to the system and can't change per-application.

hackbod
  • 90,665
  • 16
  • 140
  • 154