Player component │bugs, issues - 1.5.5 Update │ Shared folders

Play a sound from Shared folder /Music on Android 11+ (but some also applies to Android < 11)

I copied an audio file (sound.ogg) from the assets into the Shared folder /Music and wanted to play it from there with the Player component. (It doesn’t matter here how I copied it from the assets.)

Player.Source/storage/emulated/0/Music/sound.ogg (absolute path).


Problems / bugs (with APK):

  1. The sound is not played

  2. Obviously READ permission is required here (incorrectly) and must therefore be declared in the Manifest (which is not the case).
    (This should be only required if the file was not created by the app itself.)

  3. After I added this permission to the Manifest (using my extension DeclareReadWrite) the permission is not requested automatically.

  4. After I did this manually, the sound is again not played (“unable to load …”)

  5. Only after changing the absolute path to a full path (Player.Source) it finally works.

Some bugs / problems too much for most (at least for a “normal” user), I think!

Hence my suggestion/recommendation to the Kodular team (same applies for MIT):

The easiest and best way to deal with all these permission bugs/problems (not just this problem here with the Player component) is the following (IMHO):

  1. Declare READ and WRITE always (WRITE up to Android 10).

  2. Remove all automatic requesting of storage permissions from all components.

  3. Let the user decide where, when, which storage permission should/must be requested manually on which Android version.
    Usually as follows: (For more details seehere :exclamation:)
    If API < 30, request READ and / or WRITE, else request READ (only if the file is a media file and is not created by the app itself).

Google has overcomplicated the new Android filesystem (totally unnecessarily) so that NOBODY can avoid looking into it deeply before anyone builds apps since targetSdkVersion=30.

Sorry if not everyone can follow me because this is really advanced stuff. :wink:

1 Like

See also here:

Even the lead software engineer for the MIT App Inventor project (Evan Patton) admitted: