I have a live wallpaper which has some resources loaded and set up inside my custom WallpaperService class. Something like this:
class MyLiveWallpaperService extends WallpaperService {
MyResources sharedResources;
public onCreate() {
// set up some resources
}
public MyResources getSharedResources() {
return sharedResources;
}
}
And I also have a preferences activity for this live wallpaper that is properly set in res/xml/wallpaper.xml. What I want is to somehow provide this PreferencesActivity an access to these shared resources. I know I could make them public static fields but I prefer a cleaner solution - if only there was a way to bind to wallpaper service (so I could access a MyLiveWallpaperService instance) that would be rly cool.
In the end activity and service are in the same process in my case, so something described as accessing local service in dev guide should work, BUT WallpaperService docs discourage overriding onBind() method which makes this idea impossible to come true.
Is there any other way? :)