I've got a live wallpaper that I'd like to communicate with from an Activity in the same package. I've never done any work with services. Would I be able to use the Local Service pattern, or am I restricted because my service is a live wallpaper, and need to use Intents or AIDL?
I think the flow would go something like this, please correct me where my process might fail:
The parts I'm not sure about are the message passing in 4-7.
Here's what I ended up doing. My primary goal was to get my live wallpaper to create a screenshot of its contents. I didn't need the current preview or whatever was actually being displayed on the home screen, just a render based on the current shared preferences.
I broke out the rendering aspects of the wallpaper service into a separate class. My wallpaper service holds an instance of this rendering class, and by making calls to this renderer, the live wallpaper functions as normal. The broken-out class allows me to instantiate an independent renderer from any other activity, to which I can send a bitmap. The renderer then simply draws to a canvas pointing at the provided bitmap, as opposed to the canvas provided from the wallpaper service under normal circumstances