EDGE UPDATE: Android 1.x Database Storage | December 8th, 2009
I just finished the basic version of Android 1.6 Database Storage for PhoneGap. Unlike Android 2.0, which has a proper implementation of this, Android 1.6 does not. There are definitely numerous bugs that can happen with this implementation of Database Storage, such as mis-formatted numbers being passed into Javascript due to what SQLite sends back to the browser, however I’ve tried to mimic the HTML 5 spec the best I could with Java and JavaScript.
Now, the code being passed is VERY primitive, and it’s not well documented. Android is notorious for having this weird API in the providers that gets in the way of you and your SQLite Database. Providing a mapping from Javascript to the rawQuery seems to have made the most sense. We have yet to add a fail condition to this yet, so when it fails, it will fail silently. That’s somewhat annoying when it comes to errors in SQL syntax, and we’ll try to hammer out that bug later this week.
December 10th, 2009 at 4:42 pm
It’s very exciting to hear about your progress on Android.
Is the stuff you’ve been working on available in Edge? So far I’ve been trying to get stuff working on Android 1.5 by using what I checked out of the android_1.5 branch a week or so ago. I’d love to switch to a more up-to-date version of PhoneGap with support for as much as possible on Android 1.5, but at the moment the default project in Edge crashes when run on Android 1.5. Are you able to advise on what I should check out or when what you’ve been working on will be available to try using?
Thanks for all the great work you’ve been doing. :)
December 16th, 2009 at 4:12 pm
It’s all in EDGE. The Android 1.5 branch was created before I decided to mess with Java Reflection.
January 5th, 2010 at 2:36 pm
I’m using the latest EDGE as well and it crashes in 1.5 for me too. It says “The application PhoneGap (process com.phonegap) has stopped unexpectedly.Please try again”
logcat says: “E/AndroidRuntime( 848): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime( 848): java.lang.VerifyError: com.phonegap.DroidGap” …
Not sure if it is related but when the app first pops up in 2.0 it gives an error about application Android Keyboard fail (process com.android.inputmethod.latin).
Anyway, just reporting what I’ve found. Otherwise I’ve been playing with the latest versions in the 2.0 emulator and it’s been great, keep up the awesome work.
January 6th, 2010 at 1:24 pm
kaptron: Can you let me know how you’re trying to run it? Usually verify errors happen when there’s an error in the AndroidManifest.xml
That being said, I don’t usually run PhoneGap in the PhoneGap directory EXCEPT for debugging. Instead, I build a jar and run the build.rb ruby script to generate ready-made Android applications that I can customize later. This works very well, and I’ll blog about it when I get the chance.
As far as keyboard errors, that has nothing to do with us. We don’t mess with any of the input methods on Android, we just catch events from the menu keypress.
February 12th, 2010 at 9:49 am
Edge version of phonegap used constants which are not present in Android 1.5 , that’s why verification fails
That’s why we have verification error and can’t start it on 1.5
if (android.os.Build.VERSION.SDK_INT <= android.os.Build.VERSION_CODES.DONUT)
Build.VERSION.SDK_INT - starting from 1.6
Build.VERSION_CODES.DONUT - also seems starting from 1.6
February 16th, 2010 at 4:11 pm
Then why don’t you submit a patch if you feel it’s necessary?
May 24th, 2010 at 6:37 am
Any news on this incompatibility with 1.5??