How to play a sound file under Android browser - android

Is there any way to play a sound file under Android browser?

Not yet, based on this:
http://textopiablog.wordpress.com/2010/06/25/browser-support-for-html5-audio/

Judging by the emulator in the android 2.3 SDK, HTML5 audio works fine (all common formats) in android 2.3. But unless all your users have Nexus S phones, that doesn't help you much at the moment. :/

Related

Cordova sound bug on android

i made a simple android app with cordova to play audio whenever a button is clicked. it works on my huawei phone (android 5.1.1) and the google emulator, but it does NOT work on any other android phones (android 4.x [4.1;4.2;4.4]).
i have the media plugin installed into the project, haven't done any android-version specific restrictions
index.js: http://puu.sh/mrY3g/9d4a99d3e9.txt
config.xml: http://puu.sh/mrY7a/ae9b06aa51.txt
thanks a lot
ps. if u need more files for investigation/troubleshooting, leave a comment :)
EDIT
It was something with Content Security Policy, fixed that, but now when i logcat my phone, when i try to play the .mp3 file, it says Permission Denied. This happens ONLY on android 4.x (On browser and android 5 works perfectly). Any help is appreciated.
I changed the way sound is played from onclick(function a) where in a() was made an audio/media control (backend) which played the sound. now i made an <audio> control in the html and via javascript i play it

load SWF file on android application

Is this even possible with version 4.4.2 now? I had tried to use webview to load swf file on android application but it does not work. Can someone verify this?
Using Flash in Webviews on Android has not official been supported for a while. It sometimes works on older (4.0 and older) Androidversion where the flash plugin still is installed but the reach is constantly decreasing and I wouldn't recommend using it.
To deploy flash applications on your mobile device you might be able to use AIR though:
http://get.adobe.com/de/air/

Android's Mediaplayer not working properly in 2.1 and 2.2?

I'm using the Mediaplayer (android.media.MediaPlayer) to play mp3-files in an app I'm developing
It works flawlessly in emulators from and above android 2.3. I've also tried it on two devices (2.3 and 3.2) and it works great.
However, in an emulator with 2.1 the audio crackles.
And in an emulator with 2.2 the audio is chopped off before it's finished (plays everything but the last half or whole second).
Is this a know problem for 2.1 and 2.2? And does it only affect the emulator but not the actual devices (which I've not had a chance to test on)?
Most probably it is happening because that the codecs which the older emulator is using in your case is not decrompressing the audio fast enough (understandable, as it is an emulator). I have worked with MediaPlayer from 2.1,2.2 and learnt that it is best not to rely on an emulator's performance. Go for a real device.
is there anyway to update the media drivers separately from the rest of the OS?
I updated my X10 Mini Pro from 1.6 to 2.1 and the media player doesn't play any sound. BUT you can see the time counter running fast forward... This is really crazy! The same with video player, even youtube. You can see the videos in Fast Fwd, no sound whatsoever.
Any ideas? Thanks a lot!

Install Adobe flash player 10.1 on Android 2.2

How can installed Adobe flash player 10.1 on Android simulator 2.2?
Hi sujay1407 until now thats not possible, I asked directly to a google engineer, necessarily needed an android device with hardware and software required for Flash Player 10.1
http://www.adobe.com/devnet/devices/articles/content_mobilization_faq.html#q07
Here you can download APKs for various versions of Android. They also install properly on the emulator, however I don't know if they actually are able to run.
http://helpx.adobe.com/flash-player/kb/archived-flash-player-versions.html
edit: nope, it installs but does not seem to work. I've just tested http://www.adobe.com/swf/software/flash/about/flashAbout_info_small.swf on emulator and empty black page showed up.

what audio formats are supported by the android browser?

What audio formats can be played using the html5 'audio' tag in the android browser? Does anyone know where to find official specs on what the android browser supports and not?
For the record, the android media formats page does not seem to cover this - I have soundfiles (3gp) playing fine in a native app, but they won't play in my webapp.
The webkit docs also do not seem to help. My soundfiles play fine in my webapp on iphone, so that version of webkit handles them fine. Shouldn't the android browser have some official documentation somewhere?
Probably there should be official documentation. If you want to test it, why not make a web page on some domain you have access to, with links to all of the different sound files you can think of, and point your browser at it.
After some testing, I've concluded that support for the HTML5 audio element is broken in Android 2.1. Details of my testing can be found on my blog. I tested on an HTC Desire running Android 2.1 and HTC Sense, whereas Amos confirmed the same error on his HTC Heor running a custom 2.1 ROM (thanks, Amos!). If anyone will try the testpage in different configurations and report back either here or on my blog, I will update with any new information.

Categories

Resources