Does anyone know how can I get SD card of the phone?
I know that someone will tell me its getExternalStorageDirectory()
or Environment.getExterna
You can get the path like the following way.....
File sdCardRoot = Environment.getExternalStorageDirectory();
PATH = sdCardRoot.toString();
If the path not exist, then you have to make the path by mkdir().....
private File getTempFile(Context context) {
final File path = new File(Environment.getExternalStorageDirectory(),
context.getPackageName());
if (!path.exists()) {
path.mkdir();
}
return new File(path, "new.png");
}
The above function will return the file...