Is there a way to use the startManagingCursor() within a service instead of an activity, with the same results (as shown here)?
More specifically, i would like to ma
Its possible, you just need to Cast it to Activity
Like below ((Activity) context).startManagingCursor(cursor);
Here is the complete code
private void getUserId(Context context) {
AdapterClass adapterClass = new AdapterClass(this,
DatabaseDetail.TABLE_USER_REGISTRATION);
adapterClass.Open();
Cursor cursor = adapterClass.fetchRecords(new String[]{"USER_OID"},
null);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
((Activity) context).startManagingCursor(cursor);
}
cursor.moveToFirst();
adapterClass.close();
}