Microsoft Security | Intune | Microsoft Intune Android
Managing Android devices using Microsoft Intune
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This code will export table tranpbilmonsms to text file tranpbilmonsms.txt. How do you clear the text inside the text file in a directory? text file file must clear first before I inserted the text from the table.. Thank you.
THIS IS THE CODE:
public void onExportTxt(View view) {
databaseAccess.open();
try {
'Insert HERE the code that will clear tranpbilmonssms.txt' databaseAccess.exportToTxt(Environment.getExternalStorageDirectory().getPath() + "/tranpbilmonsms.txt","tranpbilmonsms"); Toast.makeText(this, "Successfully export to txt.", Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Log.e("Error", e.getMessage());
Toast.makeText(this, "Failed to export to txt.", Toast.LENGTH_SHORT).show();
}
databaseAccess.close();
}