Skip to content

Commit

Permalink
readme updates for RN 0.60 autolink
Browse files Browse the repository at this point in the history
  • Loading branch information
aniravi24 authored and fabriziomoscon committed Jan 18, 2020
1 parent 8587db4 commit 19ac4d6
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# react-native-twilio-programmable-voice
This is a React Native wrapper for Twilio Programmable Voice SDK that lets you make and receive calls from your ReactNatvie App. This module is not curated nor maintained, but inspired by Twilio.

This is a React Native wrapper for Twilio Programmable Voice SDK that lets you make and receive calls from your React Native App. This module is not affiliated with or maintained by the Twilio team. This is maintained by contributions from the community.

# Twilio Programmable Voice SDK

Expand Down Expand Up @@ -47,7 +48,9 @@ ReactNative success is directly linked to its module ecosystem. One way to make
## Installation

Before starting, we recommend you get familiar with [Twilio Programmable Voice SDK](https://www.twilio.com/docs/api/voice-sdk).
It's easier to integrate this module into your react-native app if you follow the Quick start tutorial from Twilio, because it makes very clear which setup steps are required.
It's easier to integrate this module into your react-native app if you follow the Quick start tutorial from Twilio, because it makes very clear which setup steps are required. On RN 0.60+, this module can be auto-linked (Android still requires FCM setup below).

### Manual Linking


```
Expand Down Expand Up @@ -130,8 +133,9 @@ buildscript {
dependencies {
...
// on React Native 0.60+, this module can be auto-linked and doesn't need a manual entry here
compile project(':react-native-twilio-programmable-voice')
implementation project(':react-native-twilio-programmable-voice')
}
// this plugin looks for google-services.json in your project
Expand All @@ -158,22 +162,12 @@ In your `AndroidManifest.xml`
</intent-filter>
</service>
<!-- [END fcm_listener] -->
<!-- [START instanceId_listener] -->
<service
android:name="com.hoxfon.react.RNTwilioVoice.fcm.VoiceFirebaseInstanceIDService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<!-- [END instanceId_listener] -->
<!-- Twilio Voice -->

.....

```

In `android/settings.gradle`
In `android/settings.gradle` (not necessary if auto-linking on RN 0.60+)

```gradle
...
Expand All @@ -182,7 +176,7 @@ include ':react-native-twilio-programmable-voice'
project(':react-native-twilio-programmable-voice').projectDir = file('../node_modules/react-native-twilio-programmable-voice/android')
```

Register module (in `MainApplication.java`)
Register module (in `MainApplication.java`) (not necessary if auto-linking on RN 0.60+ unless you want to control microphone permission)

```java
import com.hoxfon.react.RNTwilioVoice.TwilioVoicePackage; // <--- Import Package
Expand Down

0 comments on commit 19ac4d6

Please sign in to comment.