Online radio streamer controlled by AM

Share and discuss your flows and ideas with other users.

Moderator: Martin

Post Reply
bogdyro
Posts: 241
Joined: 04 Apr 2015 15:14

Online radio streamer controlled by AM

Post by bogdyro » 08 Feb 2018 22:35

Hi. So I got a little app together that streams any kind of online music (radios: aac, mp3) by implementing exoplayer (a google media library) It works like a foreground service (notification always on) and waits for commands from automagic (by means of explicit broadcasts). It starts playback until you push the pause button or the stop button (that closes the app).
I'm attaching the app (which I won't be pusblishing on google play). a list of radios that I'm using right now and the automagic flow that puts it all together.
Usage should be like this:
You start the program that displays a notification and waits for commands from automagic.
You can click the notification that sends a broadcast to automagic ("radio.ACTION_TRIGGER_AM") which is used to start the flow. After that it's up to you how u send back the commands to the service. The attached flow shows a list of radios taken from radio_links.txt in /sdcard/automagic/ and starts playback.
Format of broadcasts that can be sent from AM:
radio_ACTION_PLAY
extras
putString("action","play")
putString("radio_name",String)
putString("url",String)

"radio.ACTION_PAUSE"

"radio.ACTION_STOP" - exits the app
The attachment tutorial.jpg is no longer available
App link:
https://drive.google.com/open?id=1Wuhvd ... DOCCBGvZ0X_
AM flow:
https://drive.google.com/open?id=1kgRaa ... s7VVvhBd8W
radio_links: (should copy it to Automagic directory on sdcard):
https://drive.google.com/open?id=1ktVhv ... WVuSbhu8qC

I've tested on android 7 and 8, should work on 5 and 6 also.
I hope you find it useful, and i'm waiting for comments or problems if they appear.
Attachments
tutorial.jpg
tutorial.jpg (36.36 KiB) Viewed 8437 times

Post Reply