I have a button in my app called "Reset" which deletes an entire folder (user folder). After that, I am trying to create again the same folder and the first time I try it, it allows me to create the folder, but the second time I try to Reset and re-create the user folder, the app crashes because the mkdir() did not create the folder and I attempted to create a database on that folder. But, the weird thing is that, after crashing, the folder has been created.
I have the permission:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
I have tried both methods:
f.mkdir();
f.mkdirs();
What could I make wrong? Any idea?