diff --git a/Android/SQLitePlugin/src/com/phonegap/plugins/sqlitePlugin/SQLitePlugin.java b/Android/SQLitePlugin/src/com/phonegap/plugins/sqlitePlugin/SQLitePlugin.java index 85697ea..f0f7469 100755 --- a/Android/SQLitePlugin/src/com/phonegap/plugins/sqlitePlugin/SQLitePlugin.java +++ b/Android/SQLitePlugin/src/com/phonegap/plugins/sqlitePlugin/SQLitePlugin.java @@ -228,23 +228,30 @@ public class SQLitePlugin extends Plugin { try { for (int i = 0; i < colCount; ++i) { key = cur.getColumnName(i); - switch(cur.getType (i)) + if(android.os.Build.VERSION.SDK_INT >= 11) { - case Cursor.FIELD_TYPE_NULL: - row.put(key, null); - break; - case Cursor.FIELD_TYPE_INTEGER: - row.put(key, cur.getInt(i)); - break; - case Cursor.FIELD_TYPE_FLOAT: - row.put(key, cur.getFloat(i)); - break; - case Cursor.FIELD_TYPE_STRING: - row.put(key, cur.getString(i)); - break; - case Cursor.FIELD_TYPE_BLOB: - row.put(key, cur.getBlob(i)); - break; + switch(cur.getType (i)) + { + case Cursor.FIELD_TYPE_NULL: + row.put(key, null); + break; + case Cursor.FIELD_TYPE_INTEGER: + row.put(key, cur.getInt(i)); + break; + case Cursor.FIELD_TYPE_FLOAT: + row.put(key, cur.getFloat(i)); + break; + case Cursor.FIELD_TYPE_STRING: + row.put(key, cur.getString(i)); + break; + case Cursor.FIELD_TYPE_BLOB: + row.put(key, cur.getBlob(i)); + break; + } + } + else + { + row.put(key, cur.getString(i)); } } fullresult.put(row);