2

I am using SQLCipher to encrypt the android database. I am getting typecast error (Can not convert from CursorLoader to Cursor) in the line for

public Loader<Cursor> onCreateLoader(int id, Bundle args){
..
..
return new CursorLoader(this, CONTENT_URI, projection, selection, null, null);
}

It will work if I am using the default Android database cursor.

Satish Navada
  • 371
  • 1
  • 2
  • 9

1 Answers1

0

You need to wrap all your dataBase routines inside standard ContentProvider class. It export standard android.database.Cursor for all your needs and keep specific DB realisation inside.

Another way - use some DAO helpers (like http://greenrobot.org/greendao/features/) for wrapping around messy SQL's

Both methods can work with SQLCipher

A. Petrov
  • 910
  • 13
  • 18