- Home /
READ_EXTERNAL_STORAGE permission out of nowhere
For some reason Unity keeps adding READ_EXTERNAL_STORAGE permission to my apk. There is not a single AndroidManifest.xml in the project where I declare that permission. I also checked all of my plugins and their post processors.
I also tried looking into Temp folder and the only file where I can find the string "READ_EXTERNAL_STORAGE" is libunity.so. Maybe Unity adds the permission there because I use one of the methods that require it?
I'm using some stuff from System.IO, namely StreamReader, also HttpWebRequest and similar stuff. Is there any way I can guess what produces this permission?
Unity 5.2.2f1
Yes, Unity will add these permissions based on code you use. You can try commenting out suspected code until it's no longer auto-generated. If you're not actually reading from external storage you should be able to manually remove the permission in the final manifest.
Thanks for the reply. The problem is - I'm not actually reading anything from external storage. I use StreamReaders to read data from HttpWebResponse streams. And I'm not even sure that StreamReader is the culprit.
Unity doesn't know that - just knows you're using a class or assembly and generates the permission. You'll likely need to go through the steps I outlined to find out what it is and see if you can eli$$anonymous$$ate what's causing it. Or you'll need to manually remove the permission if it isn't applicable. You can search the forums for that permission as well and you may find more information there.
Your answer
Follow this Question
Related Questions
Remove the make a phone call permission (Android) 0 Answers
Avoid android permission prompt when returning to app after changing settings on device? 0 Answers
Unity Android Native Library Entry Point Not Found but ONLY on recently added functions 0 Answers
Finish UnityPlayerActivity in android unity project 0 Answers
Unable to locate player settings. bin/Data/settings.xml 3 Answers