Vishal Bhimporwala
Vishal Bhimporwala

Reputation: 139

Android Tv : I want to access and read json file that already placed on public directory(Storage/Movie/) location for android 11 and above

In my case, the file is placed at the location: Storage/Movie/app_name/db/player.json

So, I want to read player.json file data in my app.

For Android 9 and below, I used READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE. For Android 10, I used MANAGE_EXTERNAL_STORAGE. I need a proper solution, including any alternative for Android 10 as well. Now, I need a solution for Android 11 and above.

I think MANAGE_EXTERNAL_STORAGE works with Android 11 and 12, but we need a solution for Android 13 and above.

Tried: Using File("Storage/Movie/app_name/db/player.json"), but this method throws an exception file open failed:EACCES(Permission denied).

Note: Remember that I am asking for a solution for Android TV OS.

Upvotes: 1

Views: 33

Answers (0)

Related Questions