Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.

Commit 1af3be9

Browse files
authored
Merge pull request #383 from tanguyantoine/feature/ReadmeUpdateActivity
Add singleTask Activity instructions to Readme
2 parents 13a49e5 + 7dd7aee commit 1af3be9

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@ npm install react-native-music-control --save
2828

2929
## Android
3030

31-
Add the `android.permission.FOREGROUND_SERVICE` permission to your `AndroidManifest.xml`
32-
33-
```
34-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
35-
```
31+
1. Add the `android.permission.FOREGROUND_SERVICE` permission to your `AndroidManifest.xml`:
32+
```
33+
<uses-permission
34+
android:name="android.permission.FOREGROUND_SERVICE" />
35+
```
36+
1. Set the `launchMode` of MainActivity to `singleTask` by adding in `AndroidManifest.xml`:
37+
```
38+
<activity
39+
android:name=".MainActivity"
40+
android:launchMode="singleTask">
41+
```
3642
3743
## For React Native < v0.60
3844

0 commit comments

Comments
 (0)