auxility / better-apk-expansion

Community maintained Android APK Expansion library
Apache License 2.0
27 stars 14 forks source link

Exception when Playing mp4 from OBB File #13

Open appschris opened 6 years ago

appschris commented 6 years ago

This only happens on some devices like Huawei P10 light, on other devices videos playing correctly.

Any ideas?

E/SurfaceView: Exception configuring surface
    java.lang.RuntimeException
        at com.google.android.vending.expansion.zipfile.APEZProvider.query(APEZProvider.java:238)
        at android.content.ContentProvider.query(ContentProvider.java:1057)
        at android.content.ContentProvider.query(ContentProvider.java:1149)
        at android.content.ContentProvider$Transport.query(ContentProvider.java:242)
        at android.content.ContentResolver.query(ContentResolver.java:766)
        at android.content.ContentResolver.query(ContentResolver.java:716)
        at android.content.ContentResolver.query(ContentResolver.java:667)
        at android.provider.MediaStore.getDataColumn(MediaStore.java:2506)
        at android.provider.MediaStore.getPath(MediaStore.java:2487)
        at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1048)
        at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1108)
        at android.widget.VideoView.openVideo(VideoView.java:402)
        at android.widget.VideoView.-wrap0(Unknown Source:0)
        at android.widget.VideoView$7.surfaceCreated(VideoView.java:690)
        at android.view.SurfaceView.updateSurface(SurfaceView.java:707)
        at android.view.SurfaceView$2.onPreDraw(SurfaceView.java:151)
        at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:977)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2516)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)
        at android.view.Choreographer.doCallbacks(Choreographer.java:790)
        at android.view.Choreographer.doFrame(Choreographer.java:721)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)
        at android.os.Handler.handleCallback(Handler.java:808)
        at android.os.Handler.dispatchMessage(Handler.java:101)
        at android.os.Looper.loop(Looper.java:166)
        at android.app.ActivityThread.main(ActivityThread.java:7425)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
vadymhimself commented 6 years ago

I would recommend to unzip the file and read it using the regular file system instead of zipfile

appschris commented 6 years ago

Hm this seems more like a workaround than a solution !

vadymhimself commented 6 years ago

You're right, it's a temporary workaround for your problem. However, unzipping your files would also give you higher read speeds which might fix your rendering error

BrainCrumbz commented 5 years ago

@appschris did you ever manage to make this work? As of today, we incur in exactly the same issue (with original Google library though). I hope it's ok to ask here, not looking to detour the issue.

There's also someone else with same issue on StackOverflow, we're looking for hints there as well.