after Android M, some permission not grant in default.
after WRITE_EXTERNAL_STORAGE written on your AndroidMenifest.xml, you have to check permission at runtime as codes.
there is topic discuss about this issue on stackoverflow:
stackoverflow.com/questions/30549561/how...missions-at-run-time