Does android come with a remote API for audio (background) playback?

452 views Asked by At

I wonder if there is a way to (IP-) remote control an Android device to make it playback audio in the background? (eg run the mediaplayer)

I appretiate any suggestion, even if it means rooting or 3rd party applications. It's important that the playback does starts in the background and doesn't focus on the media players frontend etc. Any form a HTTP XML/JSON API would be nice - but anything would do.

1

There are 1 answers

2
Sound Conception On BEST ANSWER

You do not need to root the device or use 3rd party applications.

You can use Push Notification to get a remote server to "push" information to an app, such as when to play audio.
Yes, audio can be made to play in the background. In fact, MediaPlayer does not bring up any "frontend" or UI. Read the documentation for the audio APIs. 'MediaPlayer' is a class for playing media. It does not provide any UI.

It sounds like you want to write an app that sits in the background on your device, and wait's for messages from a remote server telling it to play audio. For long running background tasks like this you should also look at classes like IntentService.

Hopefully this points you in the right direction for some further reading.