I created a database to store answers from a survey, but I can not see my database, I do not see the package of my application and I can not even access the data / data / mi.example.myapplication / databases directory No may l!! Please, I need help.
EDITED:
Here, create my database and make it accessible from the memory card.
encuestadoSQLiteHelper encuestado = new encuestadoSQLiteHelper(this, "DBEncuestado", null, 1);
final SQLiteDatabase db = encuestado.getWritableDatabase();
try {
File sd = Environment.getExternalStorageDirectory();
File data = Environment.getDataDirectory();
if (sd.canWrite()) {
String currentDBPath = "/data/carpetahola/com.example.pablo.myapplication/databases/DBEncuestado";
String backupDBPath = "backdatabase.sqlite";
File currentDB = new File(data, currentDBPath);
File backupDB = new File(sd, backupDBPath);
if (currentDB.exists()) {
FileChannel src = new FileInputStream(currentDB).getChannel();
FileChannel dst = new FileOutputStream(backupDB).getChannel();
dst.transferFrom(src, 0, src.size());
src.close();
dst.close();
}
}
} catch (Exception e) {
System.out.println("Surgió un error:"+e);
}