Monday, April 16, 2012

Causing the next song to play

With the android music player you can change songs using the following broadcast. It's not guaranteed to work with any other music players, or even with any updates they make, however it works for what I need right now (I have no interest in making a music player), If you have a music app and have an intent to change songs,etc, please let me know and I'd be happy to support if possible. I found this across the interwebs somewhere probably nearly a year ago now, I can't remember where I found it, or who wrote it, so if you are the one responsible I would love to give you credit (i'm sure it came from stackoverflow at one point, but after a lot of searching recently I can't seem to find anything about it).
Intent i = new Intent(""); i.putExtra("command", "next"); sendBroadcast(i);
Good luck.