Discussion Forums  >  Audio, Video, Playing, Recording

Replies: 7    Views: 256

mashkioya
Aspiring developer
Profile
Posts: 2
Reg: Oct 30, 2012
Atlanta
20
01/25/13 08:05 AM (12 years ago)

Streaming audio in browser in different Android versions

OK, here's my setup: I have a list menu, the items of which launch a native app, which is the Browser, and the URL I am providing is to an MP3 file. In most Android versions I've tried, this works fine: I tap the menu item, browser opens, once it figures out it's an MP3 file, a little player starts playing it. However, I have an Android 2.3.4 phone, and when I do this same thing, the browser opens, starts loading, and when it figures out it's an MP3 file, it jumps back to my app without playing anything. Does anyone have an idea of what I can do to remedy this? I thought about using a 3rd-party plugin to play audio, but the trick is that I have both iOS and Android apps linked to this project, and it will have to work on both of those (opening MP3 in browser on iOS works fine, BTW). Thanks!
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/25/13 08:47 AM (12 years ago)
Hi @mashkioya, You do not want the Android default player to stream the mp3 file? On the 2.3.4, does it prompt you for how would you like to play this file? LA
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/25/13 01:38 PM (12 years ago)
Many of the plugins have a background audio feature which can play an mp3. These works in Android an IOS. Would that approach work for you?
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
01/25/13 02:08 PM (12 years ago)
What background plugins are you referring to? I have an issue with iOS, since I up graded my operating system to 6.0.1 the sound won't play on the phones built in speakers but will play through the headphones. Really annoyning! Can't work it out. Sorry for hi-jacking post.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/25/13 03:13 PM (12 years ago)
I'm talking about the Background Audio setting - e.g. in the custom html/text plug-in, custom url, html doc and others.
 
mashkioya
Aspiring developer
Profile
Posts: 2
Reg: Oct 30, 2012
Atlanta
20
like
01/29/13 02:12 PM (12 years ago)
OK, I think I've figured out what was wrong, and I'm sorry to have bothered you guys about it. It seems that the device I was testing on wasn't connected to the Internet, so no wonder it wasn't loading the MP3 files! However, I've also had this problem on certain versions of Android in the emulator. Would it be safe to assume that this is just an emulator quirk, and that the default player would play the file on any real Android device, as long as it is connected to the Internet?
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
01/29/13 02:15 PM (12 years ago)
Hi @mashkioya, One thing I found out real quick was never assume, especially on Android emulator, and test test and more test. If you need testing, I can test on my Android device. LA
 
Stu
Lost but trying
Profile
Posts: 1
Reg: May 09, 2014
la paz
10
like
05/09/14 09:20 AM (11 years ago)
Hey... I need some assistance from you guys... I see you already walked the way I just started. I need to make people with android can listen the stream with their browser. How can I make it? Regards, Stu
 

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.