This repository contains the Android version of the BuildmLearn Toolkit. BuildmLearn Toolkit is an easy-to-use program that helps the users make mobile apps without any knowledge of application development.
@opticod
In few phones while adding a new item if we try to upload an image with high memory the application is crashing when we attempt to decode input stream into bitmap.
Error:
02-10 03:41:40.597 21964-21964/org.buildmlearn.toolkit E/AndroidRuntime: FATAL EXCEPTION: main java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:623) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:695) at org.buildmlearn.toolkit.templates.FlashTemplate.onActivityResult(FlashTemplate.java:395) at org.buildmlearn.toolkit.activity.TemplateEditor.onActivityResult(TemplateEditor.java:398) at android.app.Activity.dispatchActivityResult(Activity.java:5515) at android.app.ActivityThread.deliverResults(ActivityThread.java:3429) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3476) at android.app.ActivityThread.access$1200(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1337) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5317) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)
@opticod In few phones while adding a new item if we try to upload an image with high memory the application is crashing when we attempt to decode input stream into bitmap.
Error:
02-10 03:41:40.597 21964-21964/org.buildmlearn.toolkit E/AndroidRuntime: FATAL EXCEPTION: main java.lang.OutOfMemoryError at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:623) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:695) at org.buildmlearn.toolkit.templates.FlashTemplate.onActivityResult(FlashTemplate.java:395) at org.buildmlearn.toolkit.activity.TemplateEditor.onActivityResult(TemplateEditor.java:398) at android.app.Activity.dispatchActivityResult(Activity.java:5515) at android.app.ActivityThread.deliverResults(ActivityThread.java:3429) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3476) at android.app.ActivityThread.access$1200(ActivityThread.java:157) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1337) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5317) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) at dalvik.system.NativeStart.main(Native Method)
Solution: We can use subsampling as described here. https://developer.android.com/topic/performance/graphics/load-bitmap.html#load-bitmap