Can't write file on SD-card
I'm trying to write a photo on the SD card without success. I've got the permissions to write in the removable storage and the sd card is mounted. Also, I checked that the path to the SD card exists and I have obtained a positive result. Where it fails is when I use the mkdir() function. It returns false and no file is created. I have tested on both a Samsung A6(Marshmallow) and a Samsung Tab4(Lollipop) This is the snippet of code I'm using to retrieve the path to the SD-card. Because the standard procedure didn't work with Samsung devices, I'm using this snippet of code that I took from a