Android WebView playing audio with javascript -


I'm trying to stop playing a HTML app with a sound very fast (Sound Manager 2's Together) WebView using a native Android app. From my research, I have not seen any evidence that can be played in any other way using sound, such as MP3, Javascript or webview.

My goal now is to have more and more port on the HTML app and then finally create a true native application without using the webwiz.

Please tell me if anyone has been playing successfully, using the webwews and javascript audio or if this is not possible at this time.

Thank you.

Play around this:

  if (cm.message (". Play sound")) {// string [] temp = cm.message (). Split("#"); Audio Manager AudioGenager = (Audio Manager) getSystemService (AUDIO_SERVICE); Float realism = (float) audiomaingere.streamwolume (AUDIO MANAGER. STREAM_MUSIC); Float Maxvalamum = (Float) AudiManager. Tastemax Maxwell (AudioManager. STREAM_MUSIC); Float Volume = RealVolume / Max Volume; If (weighted) {soundPool.play (sound id, volume, volume, 1, 54, 1f); Logs. E ("test", "played sound"); }} And if (in "cm.message ()." ("Stop sound") {soundPool.stop (1); Log.e ("test", "stoped"); } MyWebView.loadUrl ("File: ///android_asset/timer.html"); SoundID = soundPool.load (this, R.raw.sound1,1);  

Comments