File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,21 @@ Be sure to set this only after your call is ready for two way audio; used both i
136136RNCallKeep .setCurrentCallActive (uuid);
137137```
138138
139+ - ` uuid ` : string
140+ - The ` uuid ` used for ` startCall ` or ` displayIncomingCall `
141+
142+ ### isCallActive
143+ _ This feature is available only on IOS._
144+
145+ Returns true if the UUID passed matches an existing and answered call.
146+ This will return true ONLY if the call exists and the user has already answered the call. It will return false
147+ if the call does not exist or has not been answered. This is exposed to both React Native and Native sides.
148+ This was exposed so a call can be canceled if ringing and the user answered on a different device.
149+
150+ ``` js
151+ RNCallKeep .isCallActive (uuid);
152+ ```
153+
139154- ` uuid ` : string
140155 - The ` uuid ` used for ` startCall ` or ` displayIncomingCall `
141156
Original file line number Diff line number Diff line change @@ -304,13 +304,13 @@ - (void)requestTransaction:(CXTransaction *)transaction
304304 }];
305305}
306306
307- + (BOOL )checkIfActiveCall : (NSString *)uuidString
307+ + (BOOL )isCallActive : (NSString *)uuidString
308308{
309309 CXCallObserver *callObserver = [[CXCallObserver alloc ] init ];
310310 NSUUID *uuid = [[NSUUID alloc ] initWithUUIDString: uuidString];
311311
312312 for (CXCall *call in callObserver.calls ){
313- NSLog (@" Connected: %d " , [call.UUID isEqual: uuid]);
313+ NSLog (@" [RNCallKeep] isCallActive %@ %d ? " , call. UUID , [call.UUID isEqual: uuid]);
314314 if ([call.UUID isEqual: [[NSUUID alloc ] initWithUUIDString: uuidString]] && !call.hasConnected ){
315315 return true ;
316316 }
You can’t perform that action at this time.
0 commit comments