Android Question Content Chooser Large Image

BarryW

Active Member
Licensed User
Longtime User
After selecting an image with filesize of 12.85mb 6000x8000px content chooser crash...

B4X:
java.lang.RuntimeException: Canvas: trying to draw too large(192000000bytes) bitmap.
    at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:280)
    at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:88)
    at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:548)
    at android.view.View.getDrawableRenderNode(View.java:21753)
    at android.view.View.drawBackground(View.java:21687)
    at android.view.View.draw(View.java:21464)
    at android.view.View.updateDisplayListIfDirty(View.java:20349)
    at android.view.View.draw(View.java:21204)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
    at android.view.View.draw(View.java:21475)
    at android.view.View.updateDisplayListIfDirty(View.java:20349)
    at android.view.View.draw(View.java:21204)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
    at android.view.View.updateDisplayListIfDirty(View.java:20340)
    at android.view.View.draw(View.java:21204)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
    at android.view.View.updateDisplayListIfDirty(View.java:20340)
    at android.view.View.draw(View.java:21204)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
    at android.view.View.updateDisplayListIfDirty(View.java:20340)
    at android.view.View.draw(View.java:21204)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
    at android.view.View.updateDisplayListIfDirty(View.java:20340)
    at android.view.View.draw(View.java:21204)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
    at android.view.View.updateDisplayListIfDirty(View.java:20340)
    at android.view.View.draw(View.java:21204)
    at android.view.ViewGroup.drawChild(ViewGroup.java:4412)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4171)
    at android.view.View.draw(View.java:21475)
    at com.android.internal.policy.DecorView.draw(DecorView.java:830)
    at android.view.View.updateDisplayListIfDirty(View.java:20349)
    at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:575)
    at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:581)
    at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:654)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:3689)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3484)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2821)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1784)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7787)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1031)
    at android.view.Choreographer.doCallbacks(Choreographer.java:854)
    at android.view.Choreographer.doFrame(Choreographer.java:789)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1016)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:224)
    at android.app.ActivityThread.main(ActivityThread.java:7520)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
 

BarryW

Active Member
Licensed User
Longtime User
The program crash before raising the event of content chooser. It means I cannot get the filename of the choosen image
 
Upvote 0
Top