Hello!

I'm looking for some good design pattern for allowing users to have
access to parts of my application.

Essentially my app plays music.  I want to allow other apps, widgets,
livewallpapers, etc.. to receive currently playing information,
current playback time, and allow them to toggle playback and control
volume.

I want to create a very simple and easy to use API on which developers
can use for their apps...

My approach would be to provide now playing track information etc by
broadcasting this information to registered Broadcast receivers.  And
for the controls possibly allowing my Service to receive intents to
control playback.

Few Questions:
1. How bad is it in regards to performance/battery life to broadcast
the current playback time?  This would happen every 1 second.

2. Is it recommended to provide access to start the Service via an
Intent?  I guess I would just need to make sure that the service
terminates it self when not needed...?

3. Can I tell when a broadcast receiver has been registered?  I guess
the issue would be that the user might need to populate the "widget"
with information even if the service hasn't broadcaster yet the new
track...


I hope I somewhat make sense if not please ask I'll try to explain
better :)
Thanks!
-Moto

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to