-------This is my Database activity here i m creating database ----------
public void Database_Create(){
try{
db = openOrCreateDatabase(Environment.getExternalStorageDirectory()+"/TestExample/Test",MODE_PRIVATE,null);
}catch (Exception e){
e.printStackTrace();
}
}
------ This is my MainActivity ------------------
try{
Database dbs = new Database();
dbs.Database_Create();
Toast.makeText(dbs, "Data Ok", Toast.LENGTH_SHORT).show();
} catch (Exception e){
e.printStackTrace();
}
I m creating database in Database Activity and i want to call Database_create() method in MainActivity how do i call ?? i m getting an error db object is null , permission already i have given in manifest.xml file