I've tried to find any reference about using sqlite4java in android, but the tutorial looks like so scrimpy,
I've tried with this code, but no luck
public void test4java(){
SQLiteConnection sqLiteConnection=null;
SQLiteStatement sqLiteStatement=null;
Context context;
try
{
File databaseFile = context.getDatabasePath("SendingData.db");
sqLiteConnection=new SQLiteConnection(databaseFile);
sqLiteConnection.open();
sqLiteStatement=sqLiteConnection.prepare("SELECT * from Api");
sqLiteStatement.bind(1, id);
sqLiteStatement.step();
byte[] blob=sqLiteStatement.columnBlob(0);
Log.i("blob sqlite4java", Arrays.toString(blob));
} catch (SQLiteException e) {
e.printStackTrace();
} finally
{
if(sqLiteStatement!=null)
sqLiteStatement.dispose();
if(sqLiteConnection!=null)
sqLiteConnection.dispose();
}
}
there's another way about fetching blob over 2mb in sqlite?
I just think why sqlite can store blob till 1GB, but need less than 2MB to fetching?