Receiving MP3 play actions in a BroadcastReceiver

by Jun8 » Wed, 11 Nov 2009 03:42:33 GMT


Sponsored Links
 Hi,

I am trying to build an Android Service that should get notified when
the user starts playing an MP3. I checked LogCat when I start playing
a song and saw that the following Intent is logged:

Intent { act=com.android.music.PLAYBACK_VIEWER flg=0x4000000
cmp=com.android.music/.MediaPlaybackActivity }

I couldn't figure out how to write an IntentFilter to let my Service
know that this event has occurred and let me know the name of the song
that will be played. I searched Android reference but could not find
anything on PLAYBACK_VIEWER.

Or should I instead listen for Intent { act=android.intent.action.PICK
dat= typ=vnd.android.cursor.dir/track
cmp=com.android.music/.TrackBrowserActivity } that is fired when the
list of songs is presented?

Thanks,

C

--



Other Threads

1. about border of a panel or layout

In the Android Challenge 1 winning applications, I saw some nice
panels with nice border and curve in the corners. Are they using
Standard Layout ? How do you do it?

Thanks!

April
--~--~---------~--~----~------------~-------~--~----~

2. Contact database 鈥?Group c reation ?

See 
http://code.google.com/android/reference/android/provider/Contacts.Groups.html.
You should be able to insert into that table to create the actual
group, and then you can add people to the group using
http://code.google.com/android/reference/android/provider/Contacts.People.html#addToGroup(android.content.ContentResolver,%20long,%20long).

-Jeff




--~--~---------~--~----~------------~-------~--~----~

3. openOrCreateDatabase or what?

4. AutoCompleteTextView showing filtered results

5. Use Android as embedded platform

6. Skin editors (?)

7. How to set AlertDialog button focus?