Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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()` method

2. 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;
```