How to read and write files in android

I'm trying to make an android app and I want to keep java to a minimum. I want to be able to download and upload certain JSON files in my app, however I cannot use std::fs as it causes a permission denied error.

What do I use instead of std::fs or how do I fix the permission error?

The permission error isn't caused by std::fs. It is caused by insufficient permissions. You're probably trying to write to a forbidden location. std::fs methods work just fine.

2 Likes

Can you please tell me what directories I'm allowed to store data in? I just want to store some basic JSON data

The list of directories usable by apps is in the official documentation.

2 Likes