Skip to content

Commit 793ae2e

Browse files
authored
fix: remove FOREGROUND_SERVICE_MEDIA_PROJECTION permission from lib (#172)
* fix: remove FOREGROUND_SERVICE_MEDIA_PROJECTION permission from default lib * docs: update android screenshare readme
1 parent 303732f commit 793ae2e

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,12 @@ Enabling screenshare requires extra installation steps:
295295

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

298-
From version 2.4.0 onwards, this is handled internally and no extra setup is required.
298+
From version 2.4.0 onwards, the foreground service is handled internally,
299+
but you must declare the permission yourself in your app's AndroidManifest.xml file.
300+
301+
```
302+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
303+
```
299304

300305
### iOS
301306

android/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@
1111
<uses-permission android:name="android.permission.BLUETOOTH" />
1212
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
1313
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
14-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
1514
</manifest>

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
1313
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
1414
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
15+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
1516
<application
1617
android:name=".MainApplication"
1718
android:label="@string/app_name"

0 commit comments

Comments
 (0)