mirror of
https://github.com/moparisthebest/PhoneGap-SQLitePlugin-Android
synced 2024-11-22 00:42:20 -05:00
we need to check the API version of the device before making some of these calls
This commit is contained in:
parent
597cafd93c
commit
ba20782784
@ -228,6 +228,8 @@ public class SQLitePlugin extends Plugin {
|
|||||||
try {
|
try {
|
||||||
for (int i = 0; i < colCount; ++i) {
|
for (int i = 0; i < colCount; ++i) {
|
||||||
key = cur.getColumnName(i);
|
key = cur.getColumnName(i);
|
||||||
|
if(android.os.Build.VERSION.SDK_INT >= 11)
|
||||||
|
{
|
||||||
switch(cur.getType (i))
|
switch(cur.getType (i))
|
||||||
{
|
{
|
||||||
case Cursor.FIELD_TYPE_NULL:
|
case Cursor.FIELD_TYPE_NULL:
|
||||||
@ -247,6 +249,11 @@ public class SQLitePlugin extends Plugin {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
row.put(key, cur.getString(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
fullresult.put(row);
|
fullresult.put(row);
|
||||||
|
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user