Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanguyantoine/react-native-music-control
Display and manage media controls on lock screen and notification center for iOS and Android.
https://github.com/tanguyantoine/react-native-music-control
android ios lockscreen now-playing react react-native sound
Last synced: 3 months ago
JSON representation
Display and manage media controls on lock screen and notification center for iOS and Android.
- Host: GitHub
- URL: https://github.com/tanguyantoine/react-native-music-control
- Owner: tanguyantoine
- License: mit
- Archived: true
- Created: 2016-05-10T09:11:36.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-10-06T07:06:51.000Z (about 2 years ago)
- Last Synced: 2024-08-09T06:53:54.293Z (3 months ago)
- Topics: android, ios, lockscreen, now-playing, react, react-native, sound
- Language: Java
- Homepage: https://www.npmjs.com/package/react-native-music-control
- Size: 1.04 MB
- Stars: 696
- Watchers: 16
- Forks: 262
- Open Issues: 33
-
Metadata Files:
- Readme: README-PRE-0.60.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-music-control - React Native module to display Now playing Info on lockscreen and handle control events (Components / Media)
- awesome-react-native - react-native-music-control - Display and manage media controls on lock screen and notification center for iOS and Android. ![](https://img.shields.io/github/stars/tanguyantoine/react-native-music-control.svg?style=social&label=Star) (Components / Media)
README
# react-native-music control
Installation For React Native < v0.60## Linking on iOS
### Automatic
```
react-native link
```### Manual
In XCode, right click Libraries. Click Add Files to "[Your project]". Navigate to node_modules/react-native-music-control. Add the file MusicControl.xcodeproj.
In the Project Navigator, select your project. Click the build target. Click Build Phases. Expand Link Binary With Libraries. Click the plus button and add libMusicControl.a under Workspace.
### CocoaPods
```
pod 'react-native-music-control', :path => '../node_modules/react-native-music-control'
```Run `pod install` in /ios folder.
- - - -
## Linking on Android
### Automatic
```
react-native link
```### Manual
**android/app/build.gradle**
```diff
dependencies {
...
compile "com.facebook.react:react-native:+" // From node_modules
+ compile project(':react-native-music-control')
}
```**android/settings.gradle**
```diff
...
include ':app'
+include ':react-native-music-control'
+project(':react-native-music-control').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-music-control/android')
```**MainApplication.java**
```diff
+import com.tanguyantoine.react.MusicControl;public class MainApplication extends Application implements ReactApplication {
//......@Override
protected List getPackages() {
return Arrays.asList(
+ new MusicControl(),
new MainReactPackage()
);
}//......
}
```**Add following to your project AndroidManifest.xml**
``````
- - - -