Android Question mediaplayer with webview android 4.4.2 not working


Active Member
Licensed User
I upgraded my samsung Tab 3 from 4.2.2 to kitkat 4.4.2 and now their is some strange behaviour.

When a button is pressed (html code) the mp3 file is loaded and played , but then a black screen
appears see the picture and stays on the screen

Kitkat 4.4.2 changed it's browser from webkit to chromium do I have to set something in
B4A or in HTML ?, I tried it with api 19 and 14 same result everything worked ok in 4.2.2 api 14.

Maybe someone has experienced this before and has a solution , or someone knows a


<img src="file:///android_asset/merel640.jpg" alt="merel.jpg"> <br>
    <input type="text"  value="Merel" readonly>
  <input type="button" class="knop"  onClick="parent.location='file:///android_asset/merelvak11025.mp3' " >
  <br> <br>

B4A code

Sub WebView1_OverrideUrl(Url As String) As Boolean

Dim linkpart1,linkpart2,linkpart3,linkpart4  As String                            
'This SUB will grab the link the user clicked on and save it in URL
'bv 'file:///android_asset/sample.mp3'
' do something to show mp3 or pictures and utube
If Url.EndsWith("mp3") Then
  Url=Url.Replace("file:///android_asset/","") 'strip file:///android_asset
End If


  • webview_output.png
    5.1 KB · Views: 90


Active Member
Licensed User
No Erel, I am using the release(obfuscated) mode , the behaviour is something like this
- press the button on webpage
- the black screen is displayed with a small icon and the mp3 file is played.
- the icon on the sceen is some kind of play icon you can
press on it then it becomes a pauze icon press again than play and so on
nothing else happens
- the return button from tab can be use to close this black screen with icon but the webpage is also gone.
Upvote 0


Active Member
Licensed User
Erel here is the test project:

Ofcourse the HTMLFiles must be put in the Webviewkit\Files directory
Somehow these files are not in the Zip from B4a


    7.9 KB · Views: 75
    38.5 KB · Views: 80
Upvote 0