sd card - Android Nexus 5 code to create hidden folder stopped working -


//the code working fine on nexus 5 months stopped working, //it working fine on other devices same os version kitkat. below //code. please suggest asap.checked permissions in manifest fine.

 public static file getpicturestoragepath(int storagelocint) {         // todo auto-generated method stub         string path = environment.getexternalstoragedirectory()                 .getabsolutepath().tostring()                 + "/.drivermaticsv/"                 + activejourney.journey_folder_id                 + "/picture/";         map<string, file> externallocations = externalstorage                 .getallstoragelocations();         file sdcard = externallocations.get(externalstorage.sd_card);         file externalsdcard = externallocations                 .get(externalstorage.external_sd_card);         environment.getexternalstoragestate();         //long count = system.currenttimemillis();         if (sdcard == null) {             path = null;         } else {             path = sdcard.getabsolutepath() + "/.drivermaticsv/"                     + activejourney.journey_folder_id + "/picture/";         }         if (externalsdcard != null) {             if (storagelocint == 0) {                 path = sdcard.getabsolutepath() + "/.drivermaticsv/"                         + activejourney.journey_folder_id + "/picture/";             } else {                 path = externalsdcard.getabsolutepath() + "/.drivermaticsv/"                         + activejourney.journey_folder_id + "/picture/";             }         }         file file = new file(path);         if (!file.exists()) {             file.mkdirs();         }         return file;     } 


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -