-
Notifications
You must be signed in to change notification settings - Fork 459
Bring in Sangoma Fork Changes #64
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
Conversation
This is the culmination of the Sangoma fork work to update react-native-callkeep to support more consistent SDK features across both iOS and Android. Specifically, adding multi-call tracking to Android and a more consistent JS interface. This is a major version bump, as updating to this will break existing applications. We've attempted to keep the README updated with the proper instructions, although we did *not* write a transition guide. Happy to help contribute additional work if desired prior to merging, or to be a contributor on the community project to help maintain moving forward and avoid our own fork.
@@ -0,0 +1,44 @@ | |||
package io.wazo.callkeep; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, we started implementing conference, but it was removed from our GA requirements, so this isn't finished yet. This file is the framework for where further implementation will happen.
@@ -94,132 +139,81 @@ private Boolean canMakeOutgoingCall() { | |||
} | |||
|
|||
private Connection createConnection(ConnectionRequest request) { | |||
connection = new Connection() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved and updated to VoiceConnection.java instead of being inline in the service.
I can confirm I've been using this fork for a month or so and seems good from a functionality perspective now |
#poorsport over here forgot to thank @danjenkins for his contributions too. ;) |
Hello, thank you for this contribution! We'll check as soon as possible. |
Add updateDisplay function to iOS and fix setActive in Android
Use try catches to handle hashmap null object references
Address issue #26 change number to 'handle'
Update docs and change number to handle
@kylekurz just noticed you guys enabled multiple calls on android but havent updated endAllCalls to kill them all react-native-callkeep/index.js Line 96 in 884d6a0
|
Hi ! When B answer, I call I'm double checked the uuid (is JS and Java code) they correspond to the B call. Do you have this issue too ? |
I haven't tested this scenario yet myself - only tested it by recieving a
second call and calling setActive on the second uuid when I answer the call.
Can probably test this on Monday if Kyle cant
…On Fri, 2 Aug 2019, 18:37 Emmanuel Quentin, ***@***.***> wrote:
Hi !
We're integrating these changes in our product, that's a great work !
I've an issue with multi calls on Android, when I'm on call with a number
A, I click on Add a call in the native interface, then
didReceiveStartCallAction is triggered to call B.
When B answer, I call setCurrentCallActive with the UUID of the B call,
but when doing it, that's the first call (A) that is displayed as active.
I'm double checked the uuid (is JS and Java code) they correspond to the B
call.
Do you have this issue too ?
Thanks !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#64?email_source=notifications&email_token=AAB3LLJWMMYVEGQJUDAVDJDQCRWHDA5CNFSM4IESOGT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3OMVLQ#issuecomment-517786286>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAB3LLIMXL3ZLZWEAAREM43QCRWHDANCNFSM4IESOGTQ>
.
|
@manuquentin I'm on vacation, but @bhuangy is going to take a look. |
} | ||
} | ||
|
||
RCT_EXPORT_METHOD(updateDisplay:(NSString *)uuidString :(NSString *)displayName :(NSString *)uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method looks like a good candidate to merge with
RCT_EXPORT_METHOD(reportUpdatedCall:(NSString *)uuidString...)
on line 503 in this file, we can keep the api back-compat by adding the extra arg.
Additionally, I was thinking to make this api would be more flexible we can change uri => handle
and allow the caller/client application to also pass handleType
, as the owner of the call session. When we displayIncomingCall
we specify handleType, which may not always be of type CXHandleTypePhoneNumber
.
-displayIncomingCall
CXCallUpdate *callUpdate = [[CXCallUpdate alloc] init];
callUpdate.remoteHandle = [[CXHandle alloc] initWithType:_handleType value:handle];
} | ||
|
||
@ReactMethod | ||
public void setMutedCall(String uuid, boolean shouldMute) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Emmanuel, the native UI should update to correspond to the correct mute state, and does on our project. Can you please confirm you have this basic flow for each of your callkeep functions?
Call setMutedCall in RN app -> callkeep tells the native sdk to update audio state -> sends a didPerformSetMutedCallAction event to the RN app -> In event callback perform the actual mute action.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bhuangy !
Yes I receive the didPerformSetMutedCallAction
. You can check it in the example branch I've created.
In this example, you can start a call and mute it in the app (not in the native UI). Then you will seen that the mute button on the native UI is not in the muted state.
It's works well on iOS but not on Android (on my Samsung J3).
Tell me if you want more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manuquentin I see the issue you're describing in your example app. I'm looking at it today. Everything looks reasonable at a glance...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, what's the status of this PR? Thank you :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manuquentin I'm stumped on this. Your code looks right enough, but it's definitely not matching up properly. I've been pulled into other things, so I'm not actively looking at this right this second.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sboily Overall, I still think the PR is a serious improvement to the previous CallKeep release. @manuquentin has pointed out one place where he's seeing an issue that I've not been able to resolve yet and @danjenkins pointed out two small changes that should be addressed today or tomorrow by us.
I think the real decision is "is this better", not "is this perfect", but I'm not the maintainer, I'm the one asking for the merge, ha. If we can get to a point where everyone is happy enough to merge, we can continue pushing additional, smaller, fixes upstream during development or join as contributors (your choice) to keep pushing this forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @kylekurz, this is my previous discussion with @manuquentin and that exactly my point. I'm agree, i think we need to merge to master, give example (#77) for people to test this new feature, and release a new version on few weeks. It give chance to another people to contribute on small bug instead a big branch. So if there is no objection, i'm agree to merge it. Thank you for your contribution to enhance callkeep :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should wait until @bhuangy fixes Dan's issues (he's working on that now, should be done today) before merging.
Wrap rejectCall and answerIncomingCall for iOS
End all calls android
As of now, the only known outstanding issue I'm aware of is @manuquentin's problem with mute matching the app's state. |
Thanks @kylekurz, @bhuangy, @danjenkins @chevonc and @sboily for your implication in this PR ! |
We've completed our initial pass of updated the react-native-callkeep dependency to provide a more consistent API across the JS between Android and iOS. We've also extended the Android code to support multiple calls. We don't claim this is perfect, but it's been solid for us for the last month and @danjenkins has been utilizing our fork for some of his projects, so we think it's stable enough to bring into consideration for mainline and just work on feature requests moving forward.
Edit: Thanks to @bhuangy for his help on this too, that got squashed down in my PR.