Closed beauohara closed 11 years ago
It seems happy when I comment this out and just use
row.put(key, cur.getString(i));
But I want to be sure I am not making an error. Did sqlite cursor on Android before 11 not understand field types?
Did sqlite cursor on Android before 11 not understand field types? Yes. See: http://developer.android.com/reference/android/database/Cursor.html#getType(int) -> Since API Level 11 (Android 3.0)
I too, would like to use the plugin for Android 2.3. Is this possible?
I can't get it to work on 2.3.3. 3.1 and 4 seem to work ok in the simulator.
I'm going to try to implement this myself, but maybe with a "hack" to get around the problem in 2.3.3 and below
the problem is that in Android 10 and below is that each field is just a field, with no differentiation on the actual data type, and 11 introduced getType()
I have a feeling that for 2.2 & 2.3.3 you should just put them back as getString rather than trying to work out the data type, especially since JavaScript it pretty much type-less, and you can run things like isNaN(), etc
EDIT: the big hint that it was introduced in SDK 11 is this line: if(android.os.Build.VERSION.SDK_INT >= 11) the problem is that the code won't compile on pre-11 with that code in place!!!!
Sorry for the delay. Considering that JSON and Javascript is not strongly-typed as pointed out by @philiprjarnold, I would say remove everything marked "for old Android SDK" [< SDK 11] if you have any problems. Please report if there is anything else still wrong specifically for version 2.3.3.
Closing this issue. If there are any build errors please remove everything marked "for old Android SDK" [< SDK 11].
First off Thanks for this plugin. Working great on everything but Android 2.3.3
When I set the target in eclipse to 2.3.3 I get errors around this code and the method getType():
It seems there is a comment about how to work around, but I am not exactly sure what to do. Should I save everything using row.put(key, cur.getString(i));