Storage problem in android 11

i have face some storage problem in android 11 and 12. can any one help me regarding this?

Error invalid token/storage/emulated/0

@Anke can you help me regarding this?

On Android 11 and above, you can only access shared folders like DCIM, Downloads, and Documents, so when you are on Android 11 or above, you can use App Specific Directory or any of the shared folders.

  1. I need to see all relevant blocks.
  2. I need to know if the ringtone was created by the app itself.
  3. Note: /Ringtones is one of the shared folders and can be used to store and access media files (without storage permissions on Android 11+).
  4. If the ringtone was not created by the app itself, you need READ permission to access it on all Android versions.

@Anke here is all relevant blocks

here is all relevant blocks. can you help me to resolve it? i can’t understand how can i solve this.

No, these are not all relevant blocks.
Apart from that, this simple app (feature) can be implemented with far fewer and simpler blocks.

this one just i call data from the database

Post “Do it” result.


this block perfectly work on android 10 when i test this android 11 and + the error will come…

i think its all about Storage , but don’t understand how can i fix

@Anke help me

As I said

grafik

yes its true

Try to change the filename of the ringtone, because if you have tested the app with Companion beforehand, the filename cannot be overwritten with the APK on Android 11+ (because the APK is a new App).

So try to rename the ringtone to ringtone_1a.mp3 for example.

Answer this question:

From post 1, one can conclude that @Design_Hut is using shared folder.

There must be some problem in the download phase.
Can you show the full blocks

As I said, if the ringtone has already been downloaded by the Companion app or another app, you cannot download it again with the APK with the same filename on Android 11+.

Therefore

  • remove the file from the /Download/ringtones/ folder of your test device (manually) or
  • rename the filename of the ringtone.