Receiving MP3 play actions in a BroadcastReceiver

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

Sponsored Links

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 { flg=0x4000000 }

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= } that is fired when the
list of songs is presented?




Other Threads

1. Recycling of _ID field in SMS Table

   I've just found out that _ID field is not always unique in SMS table and
gets repeated after some days. Is it normal or some bug ? Can someone tell
what is threshold before _ID field is repeated. Actually i have implementing
a logic thinking that _ID field is always unique in all records i.e SMS,
Call logs, Contacts etc but now discovered that it is not guaranteed to be
always unique in SMS messages. I didn't check for contacts , call logs etc
but it is true for SMS messages.

Suppose a SMS messages had _ID field equal to 1. But after some days that
message is deleted so now 1 is not assigned to any message as id, will the
system assign that id to some new message whenever it wants to ?



2. Making a request over mobile network when WiFi is enabled

This is why Tethering requires rooted phones; you cannot have both radio's
active at once.

The only solution I can think of is to request sufficient permissions for
your app that you can turn WIFI off temporarily, let the 3G boot and use it.

Of course people would lose their WIFI if it's being used.
Makers of PhoneMyPC


3. Arbitrary positioning icon on a View

4. bluetooth connect process

5. Android presentation at Linux Solutions Paris 2010

6. Orange is looking for great Apps

7. Installing daemon with root permissions