Run audio on an Android Webview

Asked

Viewed 191 times

0

How do I execute audio from a url using a Webview in this case a radio URL, follow the code below.

WebView mWebView;
mWebView = (WebView)findViewById(R.id.webview);

WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);

mWebView.loadUrl("http://minharadio.com.br");

mWebView.setWebViewClient(new WebViewClient());
  • if the audio is on the page, I believe that if it opens the url normally what is the difficulty that Voce is having more specifically?

  • This should work you’re right, but the audio does not perform.

  • this page works, I will do some tests here, can it be? if Voce post the correct url I can see better

  • The following is the url http://agenciaabound.com.br/radio/radio.php.

  • Ae @Bruno Richart Voce tested on emulator or real device? because it really is strange, because the page works normally, so try to adapt its webview component by following this link https://github.com/examplecode/chromium_android_webview, if everything goes wrong, check the media libraries of your project

  • Thank you @Armandomarquessobrinho I will test, I found strange too.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.