Home > Back-end >  Do I have to ask permission for file manipulation for my Android app in unity?
Do I have to ask permission for file manipulation for my Android app in unity?

Time:06-04

I have made an app for myself in unity(android) that can check the name and creation date of files and can also rename or delete files. It works well in editor for my PC. But, when I built an APK, it did not work. So, I want to know, do I have to ask for permission for media manipulation in unity(android)? And if so, how do I do it? I'm guessing the manifest file.

CodePudding user response:

According to Unity documentation, yes you have to ask the permissions.

Here are the permissions needed for reading and writing with the manifest file markup.

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

To make the modifications in the android manifest, you need to follow these instruction on Override the Android App Manifest

Or you can request permissions during runtime, by following this Unity documentation

  • Related