# Permissions on an Android device

**URL:** https://discourse.processing.org/t/permissions-on-an-android-device/42655
**Category:** Processing for Android
**Created:** [August 27, 2023, 8:18pm UTC](https://discourse.processing.org/t/permissions-on-an-android-device/42655 "2023-08-27T20:18:12Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![markcosmic](https://avatars.discourse-cdn.com/v4/letter/m/ecc23a/32.png) [@markcosmic](https://discourse.processing.org/u/markcosmic)
#### Post date: [August 27, 2023, 8:18pm UTC](https://discourse.processing.org/t/permissions-on-an-android-device/42655/1 "2023-08-27T20:18:12Z")

</div>

Hi all,  
I’m trying to understand which permissions I need to read/write a .txt or .csv file. As well as, the permissions needed to load and play a music file. Either on internal and external storage. Any advice/thoughts will be appreciated.  
Thanks,  
Mark

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [August 27, 2023, 10:00pm UTC](https://discourse.processing.org/t/permissions-on-an-android-device/42655/2 "2023-08-27T22:00:32Z")

</div>

Hi

> [@Permission issue in reading file from external storage](https://discourse.processing.org/t/permission-issue-in-reading-file-from-external-storage/34184/44):
>
> OK, I got it working on Android 11. But first of all a huge THANK to @jafal with all the sample codes. I modified the loadImage() routine for my purpose: import android.os.Environment; import java.io.FileInputStream; import android.Manifest; import android.content.pm.PackageManager; import android.app.Activity; import android.os.Build; import android.os.Build.VERSION\_CODES; Activity activity; JSONObject json; private static String[] PERMISSIONS\_STORAGE = { Manifest.permission.READ\_EXTER…

READ\_EXTERNAL\_STORAGE  
WRITE\_EXTERNAL\_STORAGE

To give permission to the APP

In the Processing’s IDE Android mode Menu/Android/Sketch permissions

On the APDE you can do that by choosing: Three dots / Sketch Properties / Sketch Permissions.

---

<div class="post-metadata">

### Author: ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)
#### Post date: [August 27, 2023, 10:25pm UTC](https://discourse.processing.org/t/permissions-on-an-android-device/42655/3 "2023-08-27T22:25:06Z")

</div>

Hi

Look at this examples

> <https://github.com/EmmanuelPil/Android-java-code-utilities-widgets-for-Processing-for-Android/blob/master/saveStrings().txt>

> <https://github.com/EmmanuelPil/Android-java-code-utilities-widgets-for-Processing-for-Android/blob/master/saveTable()%20loadTable()>

> <https://github.com/EmmanuelPil/Android-java-code-utilities-widgets-for-Processing-for-Android/blob/master/save().txt>

---

<div class="post-metadata">

### Author: ![shedMusic](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/shedmusic/32/601_2.png) [@shedMusic](https://discourse.processing.org/u/shedMusic)
#### Post date: [August 28, 2023, 7:15pm UTC](https://discourse.processing.org/t/permissions-on-an-android-device/42655/4 "2023-08-28T19:15:35Z")

</div>

@markcosmic

Have a look at this thread too

> [@Android 13 MANAGE\_EXTERNAL\_STORAGE stops working, what can I do?](https://discourse.processing.org/t/android-13-manage-external-storage-stops-working-what-can-i-do/40362):
>
> I’m using Processing 3.5.4. My app has been working fine on Android 12. Now my phone is updated to Android 13 and my app is no longer working, due to permission changes. My app needs the permission to generate a file in an directory (in external storage) where user can open it with a 3rd party editor and modify it. Then the app reads the updated file. If I use the Processing “data” directory I don’t have permission issue. But I have no idea where I can open the file to edit. According to wha…

The whole way external memory accessed started changing with Android 11 … You can’t just ask for permissions now … you have to use the Storage Access Framework.
