Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sieuhuflit/react-native-ringtone
React native ringtone
https://github.com/sieuhuflit/react-native-ringtone
android call phone phonecall reactnative ringing ringtone
Last synced: about 1 month ago
JSON representation
React native ringtone
- Host: GitHub
- URL: https://github.com/sieuhuflit/react-native-ringtone
- Owner: sieuhuflit
- Created: 2019-02-02T09:30:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T08:03:34.000Z (almost 6 years ago)
- Last Synced: 2024-11-07T18:54:01.763Z (2 months ago)
- Topics: android, call, phone, phonecall, reactnative, ringing, ringtone
- Language: Java
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-ringtone
## Getting started
`$ npm install react-native-ringtone --save`
### Mostly automatic installation
`$ react-native link react-native-ringtone`
### Manual installation
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactlibrary.RNRingtonePackage;` to the imports at the top of the file
- Add `new RNRingtonePackage()` to the list returned by the `getPackages()` method2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-ringtone'
project(':react-native-ringtone').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-ringtone/android')
```3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-ringtone')
```## Usage
```javascript
import RNRingtone from 'react-native-ringtone';// TODO: What to do with the module?
RNRingtone;
```