All Questions

3
votes
1answers
18312 views

Android MediaPlayer Problems :"Error (-38 , 0) " and "stop called in state 1"

It's no sound from my device even the emulator. Actually, at the line "mMediaPlayer.create(this, musicIds[0]); " , eclipse suggests me two choices : "Change access to static using 'MediaPlayer'(decla...
18
votes
4answers
13784 views

AudioTrack, SoundPool or MediaPlayer Which Should I use?

I need to play multiple audio files, with different duration, like 5 to 30 seconds. And i want to set volume independently for right/left channel and also to apply effects, like Reverb or Distortion. ...
16
votes
3answers
61890 views

How do I play an mp3 in the res/raw folder of my android app?

I have a small (200kb) mp3 in the res/raw folder of my android app. I am trying to run it in an emulator from Eclipse. It is recognized as a resource in the R file but when I try to prepare/start, my ...
33
votes
3answers
74464 views

Online radio streaming app for Android

I'm building an Android app that will stream several radio stations from a Latin Country, there is like 10 stations that I know can be played in android, I got the URL's from them and actually made th...
34
votes
3answers
55812 views

how to play audio file in android

I have a mp3 file in my android mobile, lets it's a xyz.mp3 somewhere in my sdcard. I want to play it through my application. Please help me I have no idea about it.
56
votes
10answers
124912 views

iPhone SDK:How do you play video inside a view? Rather than fullscreen

I am trying to play video inside a UIView, so my first step was to add a class for that view and start playing a movie in it using this code: - (IBAction)movie:(id)sender{ NSBundle *bundle = [NS...
22
votes
9answers
37172 views

Android Stop Background Music

EDIT - FOUND A EASY 5-10 LINE SOLUTION!!! See MY OWN ANSWER BELOW!!! YAY!!!!!!!!! I've searched for 5 hours, dozens of SO posts, no answers, and this seems like the most simple obvious freaking thi...
27
votes
2answers
9287 views

Application threads vs Service threads

What are the advantages/disadvantages in placing a lengthy network access code in a thread in an activity or a thread in a service? How would it affect the application? I am writing a streaming audi...
20
votes
12answers
48712 views

Android MediaPlayer throwing "Prepare failed.: status=0x1" on 2.1, works on 2.2

I've been really banging my head against the table trying to get the MediaPlayer class to try to play h.264-encoded videos on Android 2.1. My code is rather simple: AssetFileDescriptor fileDescrip...
14
votes
2answers
35428 views

MediaPlayer.setDataSource() and prepare() not working - android

I'm having a crack at using the MediaPlayer object and not having much success. If I add a sound asset to my raw folder and call it using the int value within R, it works fine. But I want to be able...

Previous Next