How to create folder in android -
I am stuck with the build of a folder in my mobile (Micromax canvas 2). Please remove me where I made a mistake.
  file folder = new file (environment .getExternalStorageDirectory (+ + "/ example"); Boolean success = true; If (! Folder.exists ()) {success = folder.mkdirs (); } If (success) {Toast. GetApplicationContext, "Success", Toast. LNNHH_LOG). Show (); } Other {Toast. Make Text (getApplicationContext (), "Failure", Toast. LNNHHLog) Show (); }     Permission:     & lt; Usage-permission Android: name = "android.permission.WRITE_EXTERNAL_STORAGE" />     
   file f1 = new file (GetApplicationContext (.) GetFilesDir () + ""); Fol = new file (F1, "picture"); If (! Fol.exists ()) {fol.mkdir (); }    
 
  
Comments
Post a Comment