Frage

I'm currently working on a radio application and I'm having some difficulties to figure out the best way to use

 - AAC 
 - MP3
 - ...etc

Should I create a class for each player and then a service with something like

//PRIVATE ATTRIBUTES
private AACPlayer aac;
private MediaPlayer mp;
private AsyncPlayer ap;
private LivePlayer lp;
...etc

and then implement every player in this service ? or maybe create one service per format. But if the application i must use AAC for radio and mp3 for Podcast it'll be troublesome to start two services at the same time...

And note that the radio is playing live streaming (.AAC) so mediaplayer cant play it..

War es hilfreich?

Lösung

I would just use Android's built-in MediaPlayer class.

It should be able to handle the following formats:

http://developer.android.com/guide/appendix/media-formats.html

You can always make things more complicated later if you find that it doesn't meet your requirements :)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top