Reputation: 2090
Do the following method on all mobile devices and all versions of Android tablet is working properly?
API 15 +
if (MEDIA_MOUNTED.equals(getExternalStorageState())) {
String path = Environment.getExternalStorageDirectory() + "/myfolder";
}
String path always is return Correctly and always exists on all phones?
It is possible that errors on some phones and versions?
Upvotes: 0
Views: 598
Reputation: 1006624
It is possible that errors on some phones and versions?
Sure. It is fairly unlikely, particularly for devices that legitimately have the Play Store and other Google proprietary apps. Devices with those apps have to pass through compatibility testing, and that testing will include testing external storage.
String path always is return Correctly and always exists on all phones?
Your path
will exist on approximately zero phones, as few devices will ship with a myfolder/
directory off the root of external storage. The external storage path (Environment.getExternalStorageDirectory()
) should exist.
Upvotes: 1