i have an app which stores data in app databse...and i wrote code to send the app data to sdcard created in emulator... the data file has been transferred to sd card and i can view that in eclipse...but how can i see that file in emulator??where it get saved??
the code which i used to tranfer is below
try
{
File sd = Environment.getExternalStorageDirectory();
File data = Environment.getDataDirectory();
if (sd.canWrite())
{
String currentDBPath = "\\data\\sharath.android.trail\\databases\\griet1";
String backupDBPath = "sdcard_db";
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();
}
boolean bool=true;
if(bool == true)
{
Toast.makeText(Trial1Activity.this, "Backup Complete", Toast.LENGTH_SHORT).show();
bool = false;
}
}
}
catch (Exception e) {
Log.w("Settings Backup", e);
}
}
thanks in advance
If you're working in Eclipse, there is a built in File Explorer in the Android plugin. You can access it by going
Window > Show View... > Other > Android > File Explorer