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. set proxy on android web browser with required username and password

do it like this: emulator -http-proxy http://(domain)/(user):(password)@ip:port.







-- 
Regards,
Yuxing LI

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

2. Conditionally Show View?

Hi,

I have a form which is used to edit an object and when adding the
object I want the user to be able to select from a Spinner, but after
saving I'd like to use the same View, but in place of the Spinner have
a TextView. Is there a conditional option in the xml so if no Spinner
is set up it shows the TextView instead (and vice-versa)?

Sorta like:
<ListView android:id="@+id/android:list"
          android:layout_width="wrap_content"
                android:layout_height="wrap_content"/>
<TextView android:id="@+id/android:empty"
          android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="No Services Configured..."/>

In this case if the list is empty then the TextView shows... (at least
I think that's how it works :))

(BTW - I posted this about 13 hours ago in android-beginners and it
didn't turn up so I'm posting again. My apologies if it turns up
twice.)

Cheers,
Julius.
--~--~---------~--~----~------------~-------~--~----~

3. Error when I try to running Android application into Netbeans 6.5

4. Driving Directions using Google Map APIs

5. Can't open /dev/ttyVSP0 in mainloop() which located in reference-ril.c,why???????

6. BUG: Android Asset Packaging Tool (aapt) crash

7. BUG: Android Asset Packaging Tool (aapt) crash