I have written the code to check the database having values or not,I want to move to one activity if database having record and to another if having no record.But my code moving to one activity always.
final Cursor cursor = dbHelper.fetchAllRecords();
if(cursor!=null)
{
Intent i4=new Intent(MainActivity.this,MyMenu.class);
startActivity(i4);
this.finish();
}
1 Answer