Skip to content

Commit 94b9369

Browse files
Merge pull request #46 from CleverTap/develop
[VC-977] Release v0.7.6
2 parents d229253 + e616a40 commit 94b9369

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2777
-1917
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# XDE
66
.expo/
77

8+
example/.env
9+
810
# VSCode
911
.vscode/
1012
jsconfig.json

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# Change Log
22

3+
### Version 0.7.6 (June 06, 2025)
4+
5+
---
6+
**What's new**
7+
* **[Android Platform]**
8+
* Supports Signed Call Android SDK [v0.0.7.6](https://repo1.maven.org/maven2/com/clevertap/android/clevertap-signedcall-sdk/0.0.7.6/) which is compatible with CleverTap Android SDK [v6.2.1](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-620-april-3-2024).
9+
* **CallStyle Notifications on Android 12 and Onwards**:
10+
* Replaced regular call notifications with the CallStyle notifications for incoming, outgoing and ongoing calls. This update adheres to the new standards for non-dismissible notifications as outlined in the [Android 14 behavior changes](https://developer.android.com/about/versions/14/behavior-changes-all#non-dismissable-notifications). These notifications are given top priority in the notification shade or tray.
11+
* **Call Quality Control Enhancements**: Introduced network quality checks at both the initiator and receiver ends to ensure optimal call quality.
12+
- At the **Initiator Side**, the SDK checks network latency before processing a call request. If the network latency exceeds the benchmark, set by the SDK, an error with `5004` error-code within the `SignedCallResponse` promise object is returned.
13+
- At the **Receiver Side**, the SDK evaluates network quality before showing the incoming call screen. The network quality score (ranging from -1 to 100) is provided via the `onNetworkQualityResponse(int score)` callback, allowing the app to decide whether to proceed with or decline the call. Refer to the [SDK documentation](https://developer.clevertap.com/docs/signed-call-react-native-sdk#receiver-side) for detailed usage.
14+
* **Support new parameters in the `initProperties` object which gets passed to the ` SignedCall.initialize(initProperties)` method**:
15+
* `fcmProcessingMode` and `fcmProcessingNotification`: SDK supports the two modes for processing FCM calls: `FcmProcessingMode.foreground` and `FCMProcessingMode.background`. These modes determine how the SDK handles incoming calls whether in background or in a foreground service depending on whether the app is actively running or is running in the background. The `FcmProcessingMode.background` is default mode. If choosing the `FcmProcessingMode.foreground`, the `fcmProcessingNotification` parameter is mandatory. Refer to the [SDK documentation](https://developer.clevertap.com/docs/signed-call-react-native-sdk#configure-fcm-processing-mode) for more details on overriding the default mode.
16+
* `callScreenOnSignalling` : A `Boolean` property to control when the outgoing call screen appears relative to the signaling process. By default, the SDK immediately displays the outgoing call screen upon a call request and performs the validations in background. Please refer to [SDK documentation](https://developer.clevertap.com/docs/signed-call-react-native-sdk#control-call-screen-display-timing) for detailed usage.
17+
* **Support new call events in the `SignedCall.SignedCallOnCallStatusChanged` handler**:
18+
* `CallEvent.AppInitiatedDeclinedDueToNetworkQuality`: Allows to determine the cases where app initiates the call-decline based on the network quality score provided within `onNetworkQualityResponse(int score)` callback.
19+
* `CallEvent.EndedDueToLocalNetworkLoss`: Allows to determine when the call disconnects due to network loss at the local end.
20+
* `CallEvent.EndedDueToRemoteNetworkLoss`: Allows to determine when the call disconnects due to network loss at the remote end.
21+
**NOTE:** The `CallEvent.EndedDueToLocalNetworkLoss` and `CallEvent.EndedDueToRemoteNetworkLoss` events are reported alongside the existing `CallEvent.Ended` event to maintain backward compatibility.
22+
23+
* **[iOS Platform]**
24+
* Supports [Signed Call iOS SDK v0.0.9](https://github.com/CleverTap/clevertap-signedcall-ios-sdk/blob/main/CHANGELOG.md#version-009-november-19-2024) which is compatible with [CleverTap iOS SDK v7.0.2](https://github.com/CleverTap/clevertap-ios-sdk/blob/master/CHANGELOG.md#version-702-october-10-2024) and higher.
25+
26+
* **[Android and iOS Platform]**
27+
* **Remote Context Configuration for Call Screens:**
28+
* Added support for setting a *remoteContext* parameter within `callProperties` object during call initiation, allowing to pass custom context for receiver's call screens.
29+
30+
**Bug Fixes**
31+
* **[iOS Platform]**
32+
* Resolved **sa_family_t** declaration issue to ensure compatibility with Xcode 16.
33+
* Resolves `EXC_BAD_ACCESS` error that occurred when clicking the mute button on the CallKit screen. This exception was only observed in debugging mode.
34+
* Fixes synchronization issues regarding the Mute and Speaker controllers between the CallKit and native screens.
35+
36+
**Behaviour Changes**
37+
* **[Android Platform]**
38+
* Optimized screen launch delay when initiating a call. The SDK now launches the outgoing call screen immediately, without waiting for signaling confirmation. A countdown ProgressBar is displayed around the cancel button until signaling is completed. You can use the `cancelCountdownColor` parameter within the `overrideDefaultBranding` initProperty to customize the countdown ProgressBar's color. The default color is *yellow (#F5FA55)*. Please refer to [SDK documentation](https://staging.docs.dev.clevertap.net/docs/signed-call-react-native-sdk#overridedefaultbranding-all-platforms) for the details on usage.
39+
40+
**Enhancements**
41+
* **[Android Platform]**
42+
* Optimized delay in the heads-up behavior of the call notification when the user exits from the call screen.
43+
* Added fallback to the regular notification template for call notifications when using the CallStyle template, in case the full-screen intent permission is not granted.
44+
* Prevented the call notification popup when the SDK requests microphone permissions after the call is accepted.
45+
* Local branding configured during SDK initialization is now interoperable with the remote branding configured via the CleverTap dashboard, allows to override the specific branding properties without requiring all properties to be set at once.
46+
347
### Version 0.5.5 (June 24, 2024)
448

549
---

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ To get started, sign up [here](https://clevertap.com/live-product-demo/).
1919
- To add the **CleverTap Signed Call React Native SDK** to your project, run below command on terminal:
2020

2121
```text
22-
npm install @clevertap/clevertap-signed-call-react-native
22+
npm install @clevertap/clevertap-signed-call-react-native // for P2P feature
23+
```
24+
or,
25+
26+
```text
27+
npm install @clevertap/[email protected] // for M2P feature
2328
```
2429

2530
- Now, in your TypeScript or JavaScript code, you can use:

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ dependencies {
7373
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
7474
//Required dependencies for Signed Call Android SDK
7575
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
76-
compileOnly "com.clevertap.android:clevertap-android-sdk:6.2.0"
77-
compileOnly "com.clevertap.android:clevertap-signedcall-sdk:0.0.5.5"
76+
compileOnly "com.clevertap.android:clevertap-android-sdk:6.2.1"
77+
compileOnly "com.clevertap.android:clevertap-signedcall-sdk:0.0.7.6"
7878
compileOnly 'androidx.work:work-runtime:2.7.1'
7979
compileOnly('io.socket:socket.io-client:2.1.0') {
8080
exclude group: 'org.json', module: 'json'

android/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ClevertapSignedCallReactNative_kotlinVersion=1.7.0
22
ClevertapSignedCallReactNative_minSdkVersion=21
3-
ClevertapSignedCallReactNative_targetSdkVersion=33
4-
ClevertapSignedCallReactNative_compileSdkVersion=33
3+
ClevertapSignedCallReactNative_targetSdkVersion=34
4+
ClevertapSignedCallReactNative_compileSdkVersion=34
55
ClevertapSignedCallReactNative_ndkversion=21.4.7075529

android/src/main/java/com/clevertap/rnsignedcallandroid/CleverTapSignedCallModule.kt

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,18 @@ import com.clevertap.rnsignedcallandroid.internal.util.PayloadConverter.toSigned
1919
import com.clevertap.rnsignedcallandroid.internal.util.PayloadConverter.toWriteableMap
2020
import com.clevertap.rnsignedcallandroid.internal.util.Utils.log
2121
import com.clevertap.rnsignedcallandroid.internal.util.toJson
22-
import com.facebook.react.bridge.*
22+
import com.facebook.react.bridge.Promise
23+
import com.facebook.react.bridge.ReactApplicationContext
24+
import com.facebook.react.bridge.ReactContext
25+
import com.facebook.react.bridge.ReactContextBaseJavaModule
26+
import com.facebook.react.bridge.ReactMethod
27+
import com.facebook.react.bridge.ReadableMap
2328

2429
class CleverTapSignedCallModule(private val reactContext: ReactApplicationContext) :
2530
ReactContextBaseJavaModule(reactContext) {
2631
private var mSignedCall: SignedCallAPI? = null
2732
private var cleverTapAPI: CleverTapAPI? = null
33+
private lateinit var outgoingCallResponse: OutgoingCallResponse
2834

2935
init {
3036
cleverTapAPI = CleverTapAPI.getDefaultInstance(reactContext)
@@ -75,6 +81,11 @@ class CleverTapSignedCallModule(private val reactContext: ReactApplicationContex
7581
log(message = "SignedCallOnCallStatusListener is invoked in foreground or background: $data")
7682
EventEmitter.emit(context, ON_CALL_STATUS_CHANGED, data.toWriteableMap())
7783
}
84+
85+
SignedCallAPI.getInstance().setMissedCallNotificationOpenedHandler { _, data ->
86+
log(message = "MissedCallNotificationOpenedHandler is invoked in foreground or background: $data")
87+
EventEmitter.emit(context, ON_MISSED_CALL_ACTION_CLICKED, data.toWriteableMap())
88+
}
7889
}
7990
}
8091

@@ -100,7 +111,7 @@ class CleverTapSignedCallModule(private val reactContext: ReactApplicationContex
100111
val signedCallAPI: SignedCallAPI = getSignedCallAPI()
101112
initProperties?.let {
102113
try {
103-
val initConfiguration: SignedCallInitConfiguration? = getInitConfigFromReadableMap(it)
114+
val initConfiguration: SignedCallInitConfiguration? = getInitConfigFromReadableMap(it, reactContext.applicationContext)
104115
signedCallAPI.init(
105116
reactContext.applicationContext,
106117
initConfiguration,
@@ -134,20 +145,23 @@ class CleverTapSignedCallModule(private val reactContext: ReactApplicationContex
134145
val signedCallAPI: SignedCallAPI = getSignedCallAPI()
135146
try {
136147
val callOptions = callProperties?.toJson()
148+
149+
outgoingCallResponse = object: OutgoingCallResponse {
150+
override fun onSuccess() {
151+
promise.resolve(signedCallResponseToWritableMap(exception = null))
152+
}
153+
154+
override fun onFailure(callException: CallException?) {
155+
promise.resolve(signedCallResponseToWritableMap(callException))
156+
}
157+
}
158+
137159
signedCallAPI.call(
138160
reactContext,
139161
receiverCuid,
140162
callContext,
141163
callOptions,
142-
object : OutgoingCallResponse {
143-
override fun onSuccess() {
144-
promise.resolve(signedCallResponseToWritableMap(exception = null))
145-
}
146-
147-
override fun onFailure(callException: CallException?) {
148-
promise.resolve(signedCallResponseToWritableMap(callException))
149-
}
150-
}
164+
outgoingCallResponse
151165
)
152166
} catch (throwable: Throwable) {
153167
val errorMessage = "Exception while initiating the VoIP Call"

android/src/main/java/com/clevertap/rnsignedcallandroid/SignedCallOnCallStatusListener.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ open class SignedCallOnCallStatusListener {
1919
log(message = "SignedCallOnCallStatusListener is invoked in killed state: $data")
2020
EventEmitter.emit(context, Events.ON_CALL_STATUS_CHANGED, data.toWriteableMap())
2121
}
22+
23+
SignedCallAPI.getInstance().setMissedCallNotificationOpenedHandler { _, data ->
24+
log(message = "MissedCallNotificationOpenedHandler is invoked in killed state: $data")
25+
EventEmitter.emit(context, Events.ON_MISSED_CALL_ACTION_CLICKED, data.toWriteableMap())
26+
}
2227
}
2328
}
2429
}

android/src/main/java/com/clevertap/rnsignedcallandroid/internal/handlers/MissedCallActionClickHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import com.clevertap.rnsignedcallandroid.internal.util.Utils
1313
/**
1414
* Missed Call CTA handler for SignedCall Missed Call Notifications
1515
*/
16-
internal class MissedCallActionClickHandler : MissedCallNotificationOpenedHandler {
16+
internal open class MissedCallActionClickHandler : MissedCallNotificationOpenedHandler {
1717

1818
/**
1919
* Gets called from the SC SDK when the user taps on the missed call CTA

android/src/main/java/com/clevertap/rnsignedcallandroid/internal/util/Constants.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,31 @@ object Constants {
1414
"promptReceiverReadPhoneStatePermission"
1515
const val KEY_NOTIFICATION_PERMISSION_REQUIRED =
1616
"notificationPermissionRequired"
17+
const val KEY_CALL_SCREEN_ON_SIGNALLING =
18+
"callScreenOnSignalling"
1719
const val KEY_SWIPE_OFF_BEHAVIOUR_IN_FOREGROUND_SERVICE =
1820
"swipeOffBehaviourInForegroundService"
21+
const val KEY_FCM_PROCESSING_MODE =
22+
"fcmProcessingMode"
23+
const val KEY_FCM_NOTIFICATION = "fcmProcessingNotification"
24+
const val KEY_FCM_NOTIFICATION_TITLE = "title"
25+
const val KEY_FCM_NOTIFICATION_SUBTITLE = "subtitle"
26+
const val KEY_FCM_NOTIFICATION_LARGE_ICON = "largeIcon"
27+
const val KEY_FCM_NOTIFICATION_CANCEL_CTA_LABEL = "cancelCtaLabel"
1928
const val KEY_OVERRIDE_DEFAULT_BRANDING = "overrideDefaultBranding"
2029
const val KEY_MISSED_CALL_ACTIONS = "missedCallActions"
2130
const val KEY_BG_COLOR = "bgColor"
2231
const val KEY_FONT_COLOR = "fontColor"
2332
const val KEY_LOGO_URL = "logoUrl"
2433
const val KEY_BUTTON_THEME = "buttonTheme"
34+
const val KEY_CANCEL_COUNTDOWN_COLOR = "cancelCountdownColor"
2535
const val KEY_SHOW_POWERED_BY_SIGNED_CALL = "showPoweredBySignedCall"
2636
const val KEY_RECEIVER_CUID = "receiverCuid"
2737
const val KEY_CALL_CONTEXT = "callContext"
38+
const val KEY_CHANNEL = "channel"
2839
const val KEY_INITIATOR_IMAGE = "initiatorImage"
2940
const val KEY_RECEIVER_IMAGE = "receiverImage"
41+
const val KEY_REMOTE_CONTEXT = "remoteContext"
3042
const val KEY_ERROR_CODE = "errorCode"
3143
const val KEY_ERROR_MESSAGE = "errorMessage"
3244
const val KEY_ERROR_DESCRIPTION = "errorDescription"

0 commit comments

Comments
 (0)