Discussion Forums  >  Uncategorized

Replies: 6    Views: 390

Kamal
buzztouch Evangelist
Profile
Posts: 17
Reg: Oct 28, 2010
India
170
12/31/10 12:31 AM (15 years ago)

Not able to play music on Android platform

Hi David, I am trying to create audio stream.While working with app on Emulator it runs perfectly, but on the mobile the problem occurs as follow Problem: 1)It shows's Message Cannot play Video Amazed while I am trying to play audio.[http://test.timesofmoney.com/test/geeta.mp3] 2) The audio file doesn't play. How should i work out, in order to play the audio in the App ? Regards, Kamal Trivedi
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/31/10 01:43 AM (15 years ago)
The media player for Android is the same for Audio or Video, the message that reads Cannot Play Video should probably be changed to Cannot Play Media You can easily fix this in the project if you want. If you want to, it's in the Screen_Video.java file. Sooo, why won't it play on the device but will on the emulator? There are lots and lots of things that could cause this. Issues like the type of compression used for the file you are trying to play, the file type itself, etc, etc. Android devices handle file types and codecs in a few different ways (unlike the iPhone where thay all work the same!) so it could be tough to track this down. What is the URL of the file you are trying to play - I'll see what I can get it to play on ;-)
 
Kamal
buzztouch Evangelist
Profile
Posts: 17
Reg: Oct 28, 2010
India
170
like
12/31/10 03:55 AM (15 years ago)
David, The URL for the Audio is http://test.timesofmoney.com/test/geeta.mp3 Do all MP3 should be converted or should make compatible to run on Android platform.
 
Zoid66
Lost but trying
Profile
Posts: 176
Reg: Oct 26, 2010
USA
1,760
like
12/31/10 09:02 AM (15 years ago)
Kamal, I did such and all of my MP3 are doing fine. Okay some info: I had to adjust the bitrate on the MP3 file.. Seems that 128 works the best... Once I did so all streaming issues have went away.
 
Kamal
buzztouch Evangelist
Profile
Posts: 17
Reg: Oct 28, 2010
India
170
like
01/04/11 05:32 AM (15 years ago)
Hi Zoid, I have adjust the mp3 file using GOM Encoder to 128 kbps.Still it didn't works & facing same error. You can find the updated mp3 at foll link: http://test.timesofmoney.com/test/geeta.mp3
 
Zoid66
Lost but trying
Profile
Posts: 176
Reg: Oct 26, 2010
USA
1,760
like
01/04/11 07:03 PM (15 years ago)
Kamal, I took your link to the MP3 added it to a test app that I had created and that is installed on both a droid X and Samsung Galaxy S --- BOTH of the devices played the mp3 just fine... Did you have issues with the emulator? or on the device? I did find a small bug I will open in a seperate topic. I think the fix will be easy.. (It's just if you roate the phone during the audio stream it starts from the begining).
 
Kamal
buzztouch Evangelist
Profile
Posts: 17
Reg: Oct 28, 2010
India
170
like
01/08/11 08:48 AM (15 years ago)
Thanks..It works..
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.