0

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.

John Fear
  • 1,265
  • 2
  • 8
  • 10

1 Answers1

0

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.

Sound Conception
  • 5,263
  • 5
  • 30
  • 47
  • Thanks, I've got some reading to do. I don't want to build an app actually but rather I have a media streaming service at home from which I would like to remote Android devices (currently it remotes platforms like popcorn hour, raspberry pie). – John Fear Dec 17 '13 at 08:54
  • It seems that c2m has been replaced by gcm? anyway - after reading around I dont't seem to find any indication that I would be able to write a push application for the android media player. do you have any idea on details about that? it seems that the general idea is that both app and server is expected to be developed by the same person/company - rather than being used by a 3rd party server as an integration point? – John Fear Dec 17 '13 at 20:41