if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { copyToSDCard(logFilePath); } else { Toast.makeText(FPRITest.this,"No SDCard! Please insert SDCard. ",Toast.LENGTH_SHORT).show(); }