How to save data in a program

Firstly, your program needs to be converted into an app. If you run it in Notepad, Processing will automatically delete all old files. Second: With Android, apps first have to be authorized to save something. You can use hasPermission(permissionName) to test whether your app has the permission. With requestPermission(permissionName) you can request permissions. The name of the permission to store data is android.permission.WRITE_EXTERNAL_STORAGE.

2 Likes