Skip to content

android screen share #50

@RobinKamps

Description

@RobinKamps

First: thank you very much for your effort you put into this project.

On android screen share i get an error: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION.

It boils down that the manifest needs: <service android:name=".service.DisplayRecorderService" android:foregroundServiceType="mediaProjection"/> in the application section.

From minSdkVersion 28 on <uses-permission android:name="android.permission.FOREGROUND_SERVICE"/ is required.

However even when using the above i get the same error.
Perhaps it happens because this is not implemented in https://github.com/triniwiz/fancy-webrtc-android/blob/master/fancywebrtc/src/main/AndroidManifest.xml

This info found on StackOverflow could also be useful:

Make sure you call startForeground() before getMediaProjection()!

The best solution is to call startForeground() from onCreate() without any conditions,
 displaying some sort of default messages in notification.
 Then you can execute your logic and call NotificationManager.notify() with updated notification at any time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions