$ npm install rn-ringtone-manager --save
$ react-native link rn-ringtone-manager
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.natuan.RNRingtoneManagerPackage;
to the imports at the top of the file - Add
new RNRingtoneManagerPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':rn-ringtone-manager' project(':rn-ringtone-manager').projectDir = new File(rootProject.projectDir, '../node_modules/rn-ringtone-manager/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':rn-ringtone-manager')
import RNRingtoneManager from 'react-native-ringtone-manager';