Skip to content

Commit

Permalink
Merge pull request #146 from marqroldan/master
Browse files Browse the repository at this point in the history
(Android) Fixed issue where getConnectionState is not resolved properly
  • Loading branch information
Matrixbirds authored Apr 2, 2020
2 parents bf92d7d + 9f786a2 commit ada6577
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions android/src/main/java/com/syan/agora/AgoraModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -1144,11 +1144,9 @@ public void enableWebSdkInteroperability(boolean enabled, Promise promise) {
@ReactMethod
public void getConnectionState(Promise promise) {
Integer res = AgoraManager.getInstance().getConnectionState();
if (res == 0) {
promise.resolve(null);
} else {
promise.reject("-1", res.toString());
}
WritableMap map = Arguments.createMap();
map.putInt("state", res);
promise.resolve(map);
}

@ReactMethod
Expand Down

0 comments on commit ada6577

Please sign in to comment.