ExoPlayer source / permission: use internal path (app-specific dir) without read permission

It was announced that with the next major release, the ExoPlayer can be played from the app-specific directory even without READ permission. This has at least worked with the player component before, if the permission was previously denied. This works now neither with the ExoPlayer nor with the Player.


Thanks to Mika for adding the Completed event (in Kodular Eagle).

to check this:


Exoplayer_path_permission.aia (402.4 KB)

If the permission is denied, neither the ExoPlayer nor the player will play. So permission must be granted for players to play.
This is not required for all other App Inventor distributions (AI2, AppyBuilder, …).

I look current into the exoplayer bug.

But we have not changed the code at player component…

This is not true.
You see the permission dialog for default player because you use it together with exoplayer set source.

And the reasons for this “bug” is now that the exoplayer ask for permission (but he should not do it)

Short words:
The bug is current only in exoplayer and NOT player.

Status: The exoplayer bug is now fixed again for next release. Cross fingers!

2 Likes

Ok, thanks a lot Mika!

But, I removed the ExoPlayer from my test app and get the same result: Player does not play sound if permission is denied. So something has changed with the Player component.

Player_permission.aia (401.8 KB)
Player_permission.apk (5.2 MB)

The Player does not contain the write or read permission.
So its anything else which requests it but not the player

Player: android.permission.VIBRATE, android.permission.INTERNET

Ah wait… there is code from App Inventor… I need to check first what they added.
Then I know more about it.

One other question.
Is the autoplay bug fixed? You said the exoplayer starts automatic music after initialize.

If its not fixed, can you share a aiawhich contains the bug?
I think I fixed it but I want to be sure

No, the ExoPlayer does not start automatically / immediately. However, it is in the status isPlaying at Screen.Initialize.

Then is this bug fixed or the next release

The player bug should be fixed now too in next release

1 Like

Great, thank you!

Another question:

Should the app-specific directory not be like this:
/storage/emulated/0/Android/data/<PACKAGE_NAME>/files/


Yes. Already fixed too.

1 Like

How can you react so fast? :grinning:

Because Iam online :smiley:
And Iam the person for components :smiley:

VP of product :smiley:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.