1

I have to implement an app which temporary changes the wallpaper. After some time the original wallpaper has to be restored. This is easy to implement for static wallpapers. But I want to replace a live wallpaper by a static one and after some time i want to restore the live wallpaper.

After setting my temporary wallpaper I see that wallpaperinfo of the previous live wallpaper is still present. I tried to start the (android) live wallpaper service using this information but I got a security exception.

What happens with live wallpaper service when I set a static wallpaper. I think it is implementation dependent. To restart the wallpaper service is not possable because the (android)live paper service does not set "export" attribute (my guess).

Is there a possibility to simply remove my static wallpaper and let the wallpaper service continue its work ?

Christian Riedl
  • 103
  • 3
  • 9

1 Answers1

1

Setting live wallpapers are reserved for platform applications, e.g. the live wallpaper picker bundled with the device (the permission android.permission.SET_WALLPAPER_COMPONENT is defined as signatureOrSystem).

In short, you're not going to be able to do this without either rooting the device or building your own platform.

Jens
  • 16,853
  • 4
  • 55
  • 52
  • is this possible now? Can you please see my question? http://stackoverflow.com/questions/13683464/set-live-wallpaper-programmatically-and-skip-the-wallpaper-chooser – Naskov Dec 03 '12 at 15:37
  • 1
    @Naskov - at least for JellyBean the permission on `SET_WALLPAPER_COMPONENT` is still `signatureOrSystem`, preventing you from setting the live wallpaper without user interaction. – Jens Dec 03 '12 at 15:42
  • thanks for answering sir. I appreciate that. I am doing research on this topic. Thanks again. – Naskov Dec 03 '12 at 15:44
  • can I do that with Android NDK Library? Can you please check this one? http://stackoverflow.com/questions/13698266/can-i-change-live-wallpaper-programmatically-with-using-android-ndk-library – Naskov Dec 04 '12 at 07:52
  • 1
    @Naskov You will still run into the permission block - the system service (a class named `WallpaperManagerService`) verifies the caller before applying any live wallpaper - regardless if you are using an NDK hack with `IBinder`, `IServiceManager` and pushing a correctly formatted `Parcel` to trigger the API of the `WallpaperManagerService`. – Jens Dec 04 '12 at 07:59
  • one last Question, I need to make this one now without any constrains how. So If I manage to root my device? Is it possible to do this action? If is it possible can you please tell me how? – Naskov Dec 06 '12 at 09:45