Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update latest Twilio SDK, fix issue onDisconnected on Android #27

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# OSX
#
ios/.DS_Store

.DS_Store
.idea
xcuserdata
Pods
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ android {

dependencies {
compile 'com.facebook.react:react-native:+' // from node_modules
compile 'com.twilio:client-android:1.2.16'
compile 'com.twilio:client-android:+'
}
5 changes: 5 additions & 0 deletions android/proguard-rules.pro.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Twilio Client
-keep class com.twilio.** { *; }

# Apache HttpClient
-dontwarn org.apache.http.**
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void onReceive(Context context, Intent intent) {
intent.removeExtra(Device.EXTRA_CONNECTION);

_pendingConnection = incomingConnection;

_pendingConnection.setConnectionListener(this._cl);
Map<String, String> connParams = _pendingConnection.getParameters();
params = Arguments.createMap();
if (connParams != null) {
Expand Down Expand Up @@ -216,7 +216,6 @@ public void disconnect() {
@ReactMethod
public void accept() {
_pendingConnection.accept();
_pendingConnection.setConnectionListener(_receiver._cl);
_connection = _pendingConnection;
_pendingConnection = null;
}
Expand Down
Binary file modified ios/libs/TwilioSDK/Libraries/libTwilioClient.a.zip
Binary file not shown.
74 changes: 0 additions & 74 deletions ios/libs/TwilioSDK/readme.html

This file was deleted.

5 changes: 5 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Run `npm install react-native-twilio --save` in your project directory
1. Open your project in XCode, right click on `Libraries` and click `Add Files to "Your Project Name"`
2. Within `node_modules`, find `react-native-twilio/ios` and add RCTTwilio.xcodeproj to your project.
3. Add `libRCTTwilio.a` to `Build Phases -> Link Binary With Libraries`
4. Add the lib to `info.plist`
```
<key>NSMicrophoneUsageDescription</key>
<string>Need microphone to voice when making a call</string>
```

## Installation Android

Expand Down