Today I have found a possible solution to the bug that causes Droid to unable to import a pic.
Here is the suggested code. I’ll give it a try today as it is raining outside anyhoo. Much kudos for Keith, the dev of WallSwitch.
Yep. This isnt a story from Ronald Dahl with Johnny Depp starring in it. The sad truth is that about 90% of the ErrorReports I am receiving is from a Droid.
After googling a while on “bitmap size exceeds VM budget” I cant help but think it is a bug in android somewhere in the bitmapfactory. (May the future prove me wrong otherwise)
Till then I have reduced the bitmap size for the Droid. Hope this solves the outofmemory issue a little.
Also, I have decided to remove the GPS locating permission as it was used to geotag to TweetPhoto. Maybe that was too much to ask.
Wow,
what I also added is an error reporting feature developed by androidblogger
What I was afraid of is now properly measured and staring me in the eyes and hard to ignore:
OutOfMemory exceptions!
so far it happens a lot on the Droid…
I am looking into it, my hopes are set to the garbage.collector now
Thx for sending the reports people!
an example…
New Trace collected :
=====================
Error Report collected on : Sat Dec 12 06:29:54 America/Los_Angeles 2009
Informations :
==============
Version : 1.6.6
Package : com.android.thewongandonly.QuickDraw
FilePath : /data/data/com.android.thewongandonly.QuickDraw/files
Phone ModelDroid
Android Version : 2.0.1
Board : sholes
Brand : verizon
Device : sholes
Display : ESD56
Finger Print : verizon/voles/sholes/sholes:2.0.1/ESD56/20996:user/release-keys
Host : android-test-10.mtv.corp.google.com
ID : ESD56
Model : Droid
Product : voles
Tags : test-keys
Time : 1259199777000
Type : user
User : android-build
Total Internal memory : 274464768
Available Internal memory : 210382848
Stack :
=======
java.lang.OutOfMemoryError: bitmap size exceeds VM budget
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:468)
at com.android.thewongandonly.tools.DrawCanvas.onSizeChanged(DrawCanvas.java:149)
at android.view.View.setFrame(View.java:6898)
at android.view.View.layout(View.java:6825)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
at android.widget.LinearLayout.onLayout(LinearLayout.java:918)
at android.view.View.layout(View.java:6831)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:6831)
at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
at android.view.View.layout(View.java:6831)
at android.view.ViewRoot.performTraversals(ViewRoot.java:996)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4338)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
Cause :
=======
**** End of current Report ***
Today I released an update for Draw!. It now has an option to draw against android the computer. It is a first step towards playing against a real person. (I am waiting for an Android OS 2.0 update myself so I can properly test and develop.)
Anyhoo check it out and let me know where it needs improvements.
PS: the free version hasnt been updated yet. I need to merge the two branches again some day…
Having bigger bitmaps is one, but it also urges me to look at memory leaks. There is no time like the present to deal with it. I have several reports of force close issues when trying to import photos.
I have reread the following article. It’s time to face the facts and do some refactoring on this.
http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html
I ‘ll release a fix asap. Keep fingers crossed
And O, please ignore the Work in Progress feature. It doesnt do much yet but stay tuned!
Draw! 250.000 downloads mark achieved in only nine months. Not bad for an app that started as a practice project. Figures like these( and your ratings of course), motivates me to continue adding new stuff.
Having the 2.0 android sdk options in mind, someone whispered me a fun game option I am definitely planning to add. While I find it too soon to bring out a 2.0 based version already, I could start planning to shape up a simple game on the 1.6 all kids would like playing.
Well, hope you ll like it. I expect to complete it well before years end. Who knows how this evolves into…
PS: Today’s release was all about having multiple undo’s. I agree just one did not cut it. So it was time to refactor and make it 10… (Unless you change pens, then it empties the history actions list.)
Counting mala. With 4 different beads
mala donut version
I am collecting language translations for Draw
(I already have Japanese, German, Dutch, English, French, Spanish, Italian, Portuguese, Russian, Chinese (China), Chinese (Taiwan)…)
http://spreadsheets.google.com/pub?key=tWYt8PxU4l2sBMlwcYILeIQ&single=true&gid=0&output=html
We’ve rounded up so many alternate uses for your camera that you’ll start bringing it everywhere. Use it as a flashlight, a memory aid, or a mirror, and you’ll never let it leave your side again.
Your camera may be a toy, but there’s no reason it can’t also be a tool.