Tag Archives: sdcard

2,987 views

Android code basic rules for developers

read write file from to assets, sdcard,, internal directory, read bytes array, open save file to sdcard or internal directory, get file path, write bytes array, dir reading, dir create, for while calculation, read input , write output Download project … Continue reading

Posted in Android Examples Code | Tagged , , , , , | Comments Off on Android code basic rules for developers
7,762 views

SD card SDcard get external storage directory Android

Environment.getExternalStorageDirectory()+ File.separator Boolean canWrite = Environment.getExternalStorageDirectory().canWrite() ; if(canWrite){ File f = new File(Environment.getExternalStorageDirectory() + File.separator + "my_image.jpg") f.createNewFile(); }else{   } AndroidManifest.xml <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Posted in Android Examples Code | Tagged | Comments Off on SD card SDcard get external storage directory Android