Agora-Flutter-SDK icon indicating copy to clipboard operation
Agora-Flutter-SDK copied to clipboard

Update README Android Permission part for Android 14

Open utkudenis opened this issue 1 year ago • 13 comments

Hi Agora,

Play Store directly control Foreground permission for android 14. If target SDK android 14 , package readme cannot help us.

Can you update it ?

utkudenis avatar Feb 20 '24 07:02 utkudenis

Especially for Media Projection.

utkudenis avatar Feb 20 '24 08:02 utkudenis

we tried your suggestion on the PR https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/1458 it solves our problem but it must be on the Readme.

You may find a better aproach :)

utkudenis avatar Feb 20 '24 10:02 utkudenis

We are having problems with the PlayStore with the following permissions:

  • FOREGROUND_SERVICE_CAMERA

  • FOREGROUND_SERVICE_MEDIA_PLAYBACK

  • FOREGROUND_SERVICE_MICROPHONE

How can we solve the issue if we are not currently using this foreground services?

albaschez avatar Feb 20 '24 11:02 albaschez

I think you should first check where the permission comes from by viewing the <your-project>/build/app/outputs/logs/manifest-merger-release-report.txt

Here's the report of our example:

uses-permission#android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION
ADDED from [io.agora.rtc:full-screen-sharing:4.2.6] /Users/xxx/.gradle/caches/transforms-3/e7cd6c6a6609aed2b4d7925f5922d8f2/transformed/jetified-full-screen-sharing-4.2.6/AndroidManifest.xml:8:5-94
	android:name
		ADDED from [io.agora.rtc:full-screen-sharing:4.2.6] /Users/xxx/.gradle/caches/transforms-3/e7cd6c6a6609aed2b4d7925f5922d8f2/transformed/jetified-full-screen-sharing-4.2.6/AndroidManifest.xml:8:22-91
image

After applying the https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK/issues/1458#issuecomment-1844835294, the permission in the manifest is gone.

image

littleGnAl avatar Feb 21 '24 04:02 littleGnAl

Thank you for the answer @littleGnAl . I have added the following in the build.gradle

image

Because of that now I don't have any of the FOREGROUND_SERVICE_XXX permissions on my manifest_merger that were appearing before. However, when I try to upload the app to playStore I still get the same issues about not-declared foreground services: (Health is okay, I have added that manually)

image

albaschez avatar Feb 21 '24 07:02 albaschez

@albaschez I think you can easily check where those permissions come from by viewing the <your-project>/build/app/outputs/logs/manifest-merger-release-report.txt

littleGnAl avatar Feb 21 '24 07:02 littleGnAl

@littleGnAl They do not appear in the manifest-merger-release-report. I add as an example HEALTH, which is the one that should be appearing, but CAMERA for example does not bring any result, nor do MEDIA_PLAYBACK or MICROPHONE.

image image

albaschez avatar Feb 21 '24 07:02 albaschez

Ok, I correct the path <your-project>/build/app/outputs/logs/manifest-merger-<build-type>-report.txt. So in your case, you haven't built the release apk yet, so you can check it from your manifest-merger-staging-debug-report.txt.

littleGnAl avatar Feb 21 '24 07:02 littleGnAl

Re-launched it in production-release, same issue. Providing same examples image image

albaschez avatar Feb 21 '24 08:02 albaschez

Can you check the manifest file in your final APK in Android Studio to see if these permissions exist or not? I'm not very sure how the PlayStore analyzes the permission, if you found that these permissions do not exist in the manifest file, I think you'd better raise an issue to the PlayStore to see how to work next step.

littleGnAl avatar Feb 21 '24 08:02 littleGnAl

I have done it using AndroidStudio, and the only one that appears in the manifest is Health. image

image

albaschez avatar Feb 21 '24 08:02 albaschez

@albaschez I think it's better to raise an issue to the Play Store for your issue.

littleGnAl avatar Feb 21 '24 10:02 littleGnAl

@littleGnAl Thank you for your time. I'll raise them an issue and I'll update here when they answer back

albaschez avatar Feb 21 '24 10:02 albaschez

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

github-actions[bot] avatar Mar 06 '24 05:03 github-actions[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please raise a new issue.

github-actions[bot] avatar Mar 13 '24 06:03 github-actions[bot]