Reputation: 8435
I am trying to implement following thing in android 2.x.
In my application i want to allow the user to create the custom live wallpaper kind of thing where user chooses few images and then those image will rotate in a typical fashion and after that user will be able to set it all the view as a live wallpaper within the application only.
i have successfully implemented the selection of images and its rotation now i don't know how to set live wallpaper within the application. i have tried implementing Live Wallpaper chooser but it is used to access already installed live wallpaper. but what about the dynamically created live wallpaper?
Even i tried to call it using following line of code
intent.setClassName("com.android.wallpaper.livepicker", "com.android.wallpaper.livepicker.LiveWallpaperPreview");
But it is giving me an error
java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.android.wallpaper.livepicker/.LiveWallpaperPreview } from ProcessRecord{43f94a38 29784:com.vb.ui/10038} (pid=29784, uid=10038) requires null
There might be few ways but m not sure about it
is it possible to install live wallpaper apk programmatically so that once the live wallpaper is created it is being installed by the application ?
if live wallpapers are stored in some place then we can store user created live wallpaper at that place so when live wallpaper chooser is being selected we can see the live wallpaper in the list
Upvotes: 1
Views: 2297
Reputation: 10738
Maybe you should open this custom picking activity from within the standard "Settings" button a user sees when choosing your live wallpaper.
PreferenceScreen
named "Pick Images."onClickListener
to that preference item which launches your custom image picking activity.Upvotes: 1