Skip to content

Commit

Permalink
fix: remove FOREGROUND_SERVICE_MEDIA_PROJECTION permission from lib (#…
Browse files Browse the repository at this point in the history
…172)

* fix: remove FOREGROUND_SERVICE_MEDIA_PROJECTION permission from default lib

* docs: update android screenshare readme
  • Loading branch information
davidliu authored Aug 21, 2024
1 parent 303732f commit 793ae2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,12 @@ Enabling screenshare requires extra installation steps:

Android screenshare requires a foreground service with type `mediaProjection` to be present.

From version 2.4.0 onwards, this is handled internally and no extra setup is required.
From version 2.4.0 onwards, the foreground service is handled internally,
but you must declare the permission yourself in your app's AndroidManifest.xml file.

```
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
```

### iOS

Expand Down
1 change: 0 additions & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
</manifest>
1 change: 1 addition & 0 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
Expand Down

0 comments on commit 793ae2e

Please sign in to comment.