Currently I am working in project where I need to parse a remote text file and store it in local storage (internal/external). I am able to parse the text file but unable to
Replace this lines
File myFile = new File("sdcard/mysdfile.txt"); if(!myFile.exists()){ myFile.mkdirs(); } myFile = new File("sdcard/mysdfile.txt");
with
//Saving the parsed data.........
File myFile = new File(Environment.getExternalStorageDirectory()+"/mysdfile.txt"); myFile.createNewFile();