I currently have an application running on 100 phones with android 2.3 (set by the client), but they are switching phones to 4.4 and I use sd card
to store and then display as a product listing.
The problem is in Android 4.4 I can not create folders within sd card
, I currently use the following code for checking and creating the folder.
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED))
{
file = new File(Environment.getExternalStorageDirectory() + File.separator + "imagem");
file.mkdirs();
if (file.isDirectory())
{
//metodos que fazem pesquisa de imagens omitidos
}
path returned by the above methods in Android 2.3:
/ mnt / sdcard / image
path returned by the above methods in Android 4.4 it lists as "Created" but does not create:
/ storage / emulated / 0 / image
I looked at the documentation and got no results , has the form of access changed between versions?
AndroidManifest.xml
is already allowed to read and write to sdcard.