Android Question VideoView missing OnBufferingUpdateListener?

wimpie3

Well-Known Member
Licensed User
Longtime User
The following works file on a VideoView named 'vv':
B4X:
Dim jo As JavaObject = vv
Dim e As Object = jo.CreateEventFromUI("android.media.MediaPlayer.OnErrorListener", "VVError", True)
jo.RunMethod("setOnErrorListener", Array(e))

However, this is not working:
B4X:
Dim jo As JavaObject = vv
Dim e As Object = jo.CreateEventFromUI("android.media.MediaPlayer.OnBufferingUpdateListener", "VVBuffer", True)
jo.RunMethod("setOnBufferingUpdateListener", Array(e))

I get an error: java.lang.RuntimeException: Method: setOnBufferingUpdateListener not found in: android.widget.VideoView

What am I missing here? The Android docs clearly state that OnBufferingUpdateListener is a property of VideoView.
 
Top