Issue with releasing app targeting Android 14 due to Foreground Service permissions in Zoom Video SDK

Zoom SDK Version: 1.12.0

Artifacts used:

  • us.zoom.videosdk:zoomvideosdk-core
  • us.zoom.videosdk:zoomvideosdk-videoeffects

Note that this topic is highly related to App update rejected due to Foreground service permissions, but it is relevant for the Video SDK, not the Meeting SDK.

Releasing the app targeting SDK 34 (Android 14) fails with Error 403: You must let us know whether your app uses any Foreground Service. The error is caused by Zoom declaring the following permissions in the manifest:

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL"/>

Google requires developers to fill out Foreground service permissions if Foreground services are used in the app. Each permission needs to have a rationale and a video showcasing its usage (!).

I’ve seen the answer which mentions why these permissions are needed:

FOREGROUND_SERVICE_MICROPHONE: Allows the capability to receive audio when the app is put in the background

FOREGROUND_SERVICE_MEDIA_PLAYBACK: Allows the capability to share audio while screen sharing

FOREGROUND_SERVICE_MEDIA_PROJECTION: Allows the capability to project the screen while screen sharing

FOREGROUND_SERVICE_CONNECTED_DEVICE: Allows the capability to use a Bluetooth device as the audio source

FOREGROUND_SERVICE_PHONE_CALL: Allows the capability to use a Bluetooth device for the meeting call

But this is not sufficient for the Google review process. In the Video SDK documentation, I couldn’t find anything about the detailed usage of these permissions, so I wanted to ask here:

  1. When are these foreground services used and how can we trigger them? Usually, foreground services show a status bar notification to make the user aware that the app is performing a task in the foreground, and I assume this is what Google expects to see in the video.
  2. Is it safe to remove these permissions from the manifest? I assume that if there is no screen-sharing feature in our app, removing MEDIA_PLAYBACK and MEDIA_PROJECTION will be safe, but what about the other ones?

Thank you for your assistance.

Hi @jledwon ,

Thank you for posting on the dev forum.
We’ll suggest starting a foreground notification service when the session starts. Only the FOREGROUND_SERVICE_MEDIA_PROJECTION & FOREGROUND_SERVICE_MEDIA_PLAYBACK which are specifically for screen sharing can be optional. Other permissions based on the description should be necessary when the foreground service starts.
image

Elaine

Hi Elaine,

Many thanks for your help.

I just wanted to clarify a couple of things:

  • Is my understanding correct that the Zoom Video SDK does not launch any foreground services on its own and that we have to manually launch them when a call starts if we need one?
  • If the Video SDK does not launch any foreground services on its own and our app doesn’t need one for now, would it be safe to remove all of the permissions from the manifest to simplify the Play Store review process?

Thanks again for your assistance!

@jledwon I just tested using our VSDK. Our SDK will start a foreground service after joining a session. We do not need to start the foreground service in the application.
Hope this answers your question. Thank you.

Elaine

Hi @elaine.ku,

Could you please share a little bit more from your setup (the code which results in triggering foreground service)? In my setup there is no foreground service and moreover I forcibly removed all foreground service permissions to check what would happen and the SDK works without any issues.

To join the call I use:

val params = ZoomVideoSDKSessionContext().apply {
    this.sessionName = sessionName
    this.userName = userName
    this.token = token
}
ZoomVideoSDK.getInstance().joinSession(params)

Thanks,
Jakub

@jledwon Would you please confirm whether you’re seeing a ZoomVideoSDK notification in the notification bar after you join the session? If the App is showing in the notification bar, the foreground service is being started.
Thank you

Elaine

I am having a similar issue. Android is requiring us to target Android 14, but in doing so the Google Play Console is requiring us to fill out our uses including videos of each of these permissions. We are on the React Native Zoom Video SDK 1.10 and as far as I can tell I never see a foreground job appear while I’m on a zoom call. That is a problem because google is requiring us to provide video evidence of why we are using each foreground permission. Not sure how to proceed since we don’t seem to be using any of them

Hi Robert @bob_cook , after seeing that foreground service is not started automatically when we use Video SDK, we decided to forcibly remove foreground service permissions which solved the problem. Note that this is rather a workaround than a preferable solution, to do this you’d have to add the following to your AndroidManifest.xml:

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" tools:node="remove" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" tools:node="remove" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" tools:node="remove" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" tools:node="remove" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" tools:node="remove" />

Although after latest @elaine.ku message I can’t guarantee that it won’t cause any issues. Do it on your own risk and only if you doesn’t need this permissions for other features, also ensure to heavily test the app before publishing it.

Best,
Jakub

1 Like

Hi @elaine.ku,

I don’t see the foreground service running, and there’s no notification after joining the session. Moreover, if I’m not mistaken, it is not possible to dynamically create the foreground service without first defining it in the AndroidManifest.xml. After inspecting the AndroidManifest.xml from the Zoom Video SDK, I didn’t see any <service> declared there (although I might be wrong). When testing the VSDK, did you create a new project and set it up from scratch? If so, could you please share it with us? It would be a bit strange if your setup resulted in a foreground service while ours didn’t.

Best, Jakub

Hi @jledwon ,

Sorry for the confusion. Our sample App started the foreground service as default so I misunderstood it. If you’re not using the permission, you can remove the permission in VSDK using tools:node="remove". The audio might be affected if the foreground service isn’t used and the App is in the background.
Thank you

Elaine

1 Like

@elaine.ku
You’re saying we can remove the permission if it’s not used, but how can we determine if the permission is used by your sdk or not?

For example,
FOREGROUND_SERVICE_MICROPHONE Seems like a capability that’s used by the sdk for basic functionality.
Please provide clear guidance on what these permissions are for and how to demonstrate them in a video to satisfy the new Google play Permission Requirements.

Please also explain which permissions are safe to remove and which ones are actually required by the SDK.

These requirements have been around for some time and will begin to be enforced for everyone at the end of August. Why haven’t you published a guide for how to deal with this?

Hi Nelson @nramirez,

I’m not sure if this will help you, and it does not fully address the main issue you mentioned regarding the lack of proper documentation, but perhaps it will unblock you for now:

As far as I know, it is not possible to create a foreground service without declaring it in AndroidManifest.xml. If you examine Zoom Video SDK’s Manifest (or merged Manifest), there is no <service> declaration. Therefore, I think it is safe to assume that these permissions are unused. Also, note that <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" /> is not a permission for the microphone itself. Thus, it is possible to have a video call functioning correctly without these permissions.

I completely agree with your point here:

Please provide clear guidance on what these permissions are for and how to demonstrate them in a video to satisfy the new Google Play Permission Requirements. Please also explain which permissions are safe to remove and which ones are actually required by the SDK. These requirements have been around for some time and will begin to be enforced for everyone at the end of August. Why haven’t you published a guide for how to deal with this?

Such matters should be better documented.

Thanks for your help @jledwon
Through our own trial and error, we were able to remove the following permissions.
(only the ones with tools:node=“remove”)

<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" tools:node="remove" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" tools:node="remove" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

We are not completely sure about the FOREGROUND_SERVICE_CONNECTED_DEVICE permission, as it seems to pertain to bluetooth devices. we will need further testing on this.

Removing the other permissions caused crashes for us.

Hopefully for other folks running into this issue. For most common use cases of the Zoom SDK, it should be ok to remove FOREGROUND_SERVICE_MEDIA_PROJECTION and maybe FOREGROUND_SERVICE_CONNECTED_DEVICE.

For anyone wondering where the permissions come from, they are declared in the mobilesdk aar.
You can unzip it and view the AndroidManifest.xml file there as @jledwon mentioned.

@elaine.ku
Please provide guidance on what to say, and how to demonstrate the use of FOREGROUND_SERVICE_MEDIA_PLAYBACK , FOREGROUND_SERVICE_MICROPHONE

The play store does not seem to ask about FOREGROUND_SERVICE

Hi @nramirez ,

We’re preparing the guidance document for those foreground service permissions added because of Android 14, which has not yet been published.

The FOREGROUND_SERVICE_MEDIA_PLAYBACK is for sharing audio while doing screen sharing. Please use the enableShareDeviceAudio​(true) to test it.
The FOREGROUND_SERVICE_MICROPHONE is to make the user still have the same permission as RECORD_AUDIO when the App is in the background.
Thank you.

Elaine

@elaine.ku
Can you do us a favor and post here when the guide is available?
Thank you

hi @elaine.ku , one more thing
Here, you state that FOREGROUND_SERVICE_MEDIA_PLAYBACK can be removed if not using the feature.
However when removing the permission we get the following crash:

com.zipow.videobox.share.ScreenShareServiceForSDK: 
java.lang.SecurityException: Starting FGS with type mediaPlayback
callerApp=ProcessRecord{53ea130 3844:com.xxx.android.staging.debug/u0a490} targetSDK=34
requires permissions: all of the permissions allOf=true
[android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK] 

at android.app.ActivityThread.handleCreateService(ActivityThread.java:4925)
at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2407)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: java.lang.SecurityException: Starting FGS with type mediaPlayback callerApp=ProcessRecord{53ea130 3844:com.xxx.android.staging.debug/u0a490} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK] 

We are not explicitly enabling this feature anywhere. We are on v6.1.1

Hi @nramirez ,

It seems that you’re using our Meeting SDK not the Video SDK. The function I mentioned is for Video SDK.
If you’re using our meeting SDK, the "mediaProjection|mediaPlayback|microphone|connectedDevice" these four permissions are necessary. You’re able to share audio when doing screen sharing by default in meeting SDK.
Thank you.

Elaine

Hi, In my app I have the “Meeting SDK”, my app uses it so that users can join Zoom calls without leaving the app.
In the manifest-merger-release-report.txt file I see that the following permissions are added:

  • android.permission.FOREGROUND_SERVICE
  • android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE
  • android.permission.FOREGROUND_SERVICE_MICROPHONE
  • android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION
  • android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK

Are they necessary for the use case that I apply in my app? Why does the Playstore ask me to record videos of how these permissions are used? Is there a guide?

Thanks

1 Like