Skip to content

Commit 7376d25

Browse files
Merge pull request #9 from CleverTap/develop
[Release-3164] Signed Call React Native v0.0.3
2 parents 3a57b76 + b18ea46 commit 7376d25

File tree

22 files changed

+213
-14527
lines changed

22 files changed

+213
-14527
lines changed

CHANGELOG.md

+35
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,47 @@
11
# Change Log
22

3+
### Version 0.0.3 (September 12, 2023)
4+
-------------------------------------------
5+
6+
**What's new**
7+
8+
* **[Android Platform]**
9+
* Supports [Signed Call Android SDK v0.0.4](https://repo1.maven.org/maven2/com/clevertap/android/clevertap-signedcall-sdk/0.0.4) which is compatible with [CleverTap Android SDK v5.2.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md#version-520-august-10-2023).
10+
11+
* **[iOS Platform]**
12+
* Supports [Signed Call iOS SDK v0.0.5](https://github.com/CleverTap/clevertap-signedcall-ios-sdk/blob/main/CHANGELOG.md#version-005-aug-23-2023) which is compatible with [CleverTap iOS SDK v5.2.0](https://github.com/CleverTap/clevertap-ios-sdk/blob/master/CHANGELOG.md#version-520-august-16-2023).
13+
14+
* **[Android and iOS Platform]**
15+
* Adds support for hiding the **Powered by Signed Call** label from VoIP call screens. For more information, refer to [Override Dashboard Branding for Call Screen](https://developer.clevertap.com/docs/signed-call-react-native-sdk#overridedefaultbranding-all-platforms).
16+
17+
**Changes**
18+
19+
* **[Android Platform]**
20+
* The **index.html** file used inside the SDK has been renamed to a unique name to prevent conflicts with the same file name that may exist in the application.
21+
* Captures a missed call system event when a call initiator manually cancels the call, reported under the `SCEnd` system event.
22+
* Adjust the Microphone permission prompt limit to align with the [permissible threshold](https://developer.android.com/about/versions/11/privacy/permissions#dialog-visibility) which is shown when the receiver attends the call. Previously, if the Microphone permission was denied even once, SDK would continue to block all incoming calls at the receiver's end. (***Note***: Starting from Android 11, users have the option to deny the prompt twice before the permission is blocked by system, whereas in earlier versions, users could deny the prompt until selecting the "don't ask again" checkbox.)
23+
24+
* **[Android and iOS Platform]**
25+
* Captures a missed call system event when a call initiator manually cancels the call, reported under the `SCEnd` system event.
26+
27+
**Fixes**
28+
29+
* **[Android Platform]**
30+
* Improved Bluetooth handling for a better user experience:
31+
* Voice now goes through Bluetooth when Bluetooth connectivity is established during an ongoing call.
32+
* Voice now goes through the internal speaker when Bluetooth connectivity is disabled from the call screen button.
33+
* Resolved duplicate reporting of `SCIncoming` system events caused by receiving duplicate pushes for the same call, one from the socket and one from FCM.
34+
335
## Version 0.0.2 (April 17, 2023)
36+
-------------------------------------------
37+
438
- Supports [Signed Call Android SDK v0.0.2](https://repo1.maven.org/maven2/com/clevertap/android/clevertap-signedcall-sdk/0.0.2) and [CleverTap Android SDK v4.7.5](https://github.com/CleverTap/clevertap-android-sdk/releases/tag/corev4.7.5_rmv1.0.3).
539
- Supports [Signed Call iOS SDK v0.0.2](https://github.com/CleverTap/clevertap-signedcall-ios-sdk/releases/tag/0.0.2) and [CleverTap iOS SDK v4.2.2](https://github.com/CleverTap/clevertap-ios-sdk/releases/tag/4.2.2)
640
- Supports Push Primer for [Android 13 notification runtime permission](https://developer.android.com/develop/ui/views/notifications/notification-permission).
741
- Adds new public API `disconnectSignallingSocket()` in order to close the Signalling socket connection.
842

943
## Version 0.0.1 (March 28, 2023)
44+
-------------------------------------------
1045

1146
- Initial Release.
1247
- Supports Signed Call Android SDK v0.0.1 and Signed Call iOS SDK v0.0.2.

android/build.gradle

+2-2
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:4.7.5"
77-
compileOnly "com.clevertap.android:clevertap-signedcall-sdk:0.0.2"
76+
compileOnly "com.clevertap.android:clevertap-android-sdk:5.2.0"
77+
compileOnly "com.clevertap.android:clevertap-signedcall-sdk:0.0.4"
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/src/main/java/com/clevertap/rnsignedcallandroid/CleverTapSignedCallModule.kt

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.clevertap.rnsignedcallandroid
22

3+
import android.annotation.SuppressLint
34
import com.clevertap.android.sdk.CleverTapAPI
45
import com.clevertap.android.signedcall.enums.VoIPCallStatus
56
import com.clevertap.android.signedcall.exception.CallException
@@ -26,10 +27,12 @@ class CleverTapSignedCallModule(private val reactContext: ReactApplicationContex
2627

2728
init {
2829
eventEmitter = EventEmitter(reactContext)
30+
cleverTapAPI = CleverTapAPI.getDefaultInstance(reactContext)
2931
}
3032

3133
companion object {
3234
const val NAME = "CleverTapSignedCall"
35+
const val ERROR_CLEVERTAP_INSTANCE_NOT_INITIALIZED = "CleverTap Instance is not initialized"
3336
}
3437

3538
/**
@@ -61,11 +64,20 @@ class CleverTapSignedCallModule(private val reactContext: ReactApplicationContex
6164
private fun getSignedCallAPI(): SignedCallAPI {
6265
if (mSignedCall == null) {
6366
mSignedCall = SignedCallAPI.getInstance()
64-
cleverTapAPI = CleverTapAPI.getDefaultInstance(reactContext)
6567
}
6668
return mSignedCall!!
6769
}
6870

71+
@SuppressLint("RestrictedApi")
72+
@ReactMethod
73+
fun trackSdkVersion(sdkName: String, sdkVersion: Int) {
74+
cleverTapAPI?.let {
75+
cleverTapAPI!!.setCustomSdkVersion(sdkName, sdkVersion)
76+
} ?: run {
77+
log(message = "$ERROR_CLEVERTAP_INSTANCE_NOT_INITIALIZED to track the SDK Version");
78+
}
79+
}
80+
6981
@ReactMethod
7082
fun setDebugLevel(logLevel: Int) {
7183
SignedCallAPI.setDebugLevel(logLevel.toSignedCallLogLevel())

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

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ object Constants {
1818
const val KEY_FONT_COLOR = "fontColor"
1919
const val KEY_LOGO_URL = "logoUrl"
2020
const val KEY_BUTTON_THEME = "buttonTheme"
21+
const val KEY_SHOW_POWERED_BY_SIGNED_CALL = "showPoweredBySignedCall"
2122
const val KEY_RECEIVER_CUID = "receiverCuid"
2223
const val KEY_CALL_CONTEXT = "callContext"
2324
const val KEY_ERROR_CODE = "errorCode"

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

+7-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import com.clevertap.rnsignedcallandroid.internal.util.Constants.KEY_FONT_COLOR
1515
import com.clevertap.rnsignedcallandroid.internal.util.Constants.KEY_LOGO_URL
1616
import com.clevertap.rnsignedcallandroid.internal.util.Constants.KEY_NAME
1717
import com.clevertap.rnsignedcallandroid.internal.util.Constants.KEY_RINGTONE
18+
import com.clevertap.rnsignedcallandroid.internal.util.Constants.KEY_SHOW_POWERED_BY_SIGNED_CALL
1819
import com.clevertap.rnsignedcallandroid.internal.util.PushPrimerSerializer.parsePushPrimerConfigFromInitOptions
1920
import com.clevertap.rnsignedcallandroid.internal.util.Utils.log
2021
import com.facebook.react.bridge.*
@@ -63,14 +64,19 @@ object InitConfigSerializer {
6364
val fontColor: String? = it.getValue(KEY_FONT_COLOR)
6465
val logoUrl: String? = it.getValue(KEY_LOGO_URL)
6566
val buttonTheme: String? = it.getValue(KEY_BUTTON_THEME)
67+
val showPoweredBySignedCall: Boolean? = it.getValue(KEY_SHOW_POWERED_BY_SIGNED_CALL)
6668

67-
return SignedCallScreenBranding(
69+
val callScreenBranding = SignedCallScreenBranding(
6870
bgColor,
6971
fontColor,
7072
logoUrl,
7173
if (buttonTheme == DARK_THEME) SignedCallScreenBranding.ButtonTheme.DARK
7274
else SignedCallScreenBranding.ButtonTheme.LIGHT
7375
)
76+
if (showPoweredBySignedCall != null) {
77+
callScreenBranding.showPoweredBySignedCall = showPoweredBySignedCall
78+
}
79+
return callScreenBranding
7480
} ?: run {
7581
return null
7682
}

clevertap-signed-call-react-native.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Pod::Spec.new do |s|
2222
s.requires_arc = true
2323

2424
s.dependency 'React', '>= 0.13.0', '< 1.0.0'
25-
s.dependency 'CleverTap-SignedCall-SDK', '0.0.2'
25+
s.dependency 'CleverTap-SignedCall-SDK', '0.0.5'
2626

2727
# Don't install the dependencies when we run `pod install` in the old architecture.
2828
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then

example/Gemfile.lock

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.6)
5+
rexml
6+
activesupport (7.0.7.2)
7+
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
i18n (>= 1.6, < 2)
9+
minitest (>= 5.1)
10+
tzinfo (~> 2.0)
11+
addressable (2.8.5)
12+
public_suffix (>= 2.0.2, < 6.0)
13+
algoliasearch (1.27.5)
14+
httpclient (~> 2.8, >= 2.8.3)
15+
json (>= 1.5.1)
16+
atomos (0.1.3)
17+
claide (1.1.0)
18+
cocoapods (1.12.1)
19+
addressable (~> 2.8)
20+
claide (>= 1.0.2, < 2.0)
21+
cocoapods-core (= 1.12.1)
22+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
23+
cocoapods-downloader (>= 1.6.0, < 2.0)
24+
cocoapods-plugins (>= 1.0.0, < 2.0)
25+
cocoapods-search (>= 1.0.0, < 2.0)
26+
cocoapods-trunk (>= 1.6.0, < 2.0)
27+
cocoapods-try (>= 1.1.0, < 2.0)
28+
colored2 (~> 3.1)
29+
escape (~> 0.0.4)
30+
fourflusher (>= 2.3.0, < 3.0)
31+
gh_inspector (~> 1.0)
32+
molinillo (~> 0.8.0)
33+
nap (~> 1.0)
34+
ruby-macho (>= 2.3.0, < 3.0)
35+
xcodeproj (>= 1.21.0, < 2.0)
36+
cocoapods-core (1.12.1)
37+
activesupport (>= 5.0, < 8)
38+
addressable (~> 2.8)
39+
algoliasearch (~> 1.0)
40+
concurrent-ruby (~> 1.1)
41+
fuzzy_match (~> 2.0.4)
42+
nap (~> 1.0)
43+
netrc (~> 0.11)
44+
public_suffix (~> 4.0)
45+
typhoeus (~> 1.0)
46+
cocoapods-deintegrate (1.0.5)
47+
cocoapods-downloader (1.6.3)
48+
cocoapods-plugins (1.0.0)
49+
nap
50+
cocoapods-search (1.0.1)
51+
cocoapods-trunk (1.6.0)
52+
nap (>= 0.8, < 2.0)
53+
netrc (~> 0.11)
54+
cocoapods-try (1.2.0)
55+
colored2 (3.1.2)
56+
concurrent-ruby (1.2.2)
57+
escape (0.0.4)
58+
ethon (0.16.0)
59+
ffi (>= 1.15.0)
60+
ffi (1.15.5)
61+
fourflusher (2.3.1)
62+
fuzzy_match (2.0.4)
63+
gh_inspector (1.1.3)
64+
httpclient (2.8.3)
65+
i18n (1.14.1)
66+
concurrent-ruby (~> 1.0)
67+
json (2.6.3)
68+
minitest (5.19.0)
69+
molinillo (0.8.0)
70+
nanaimo (0.3.0)
71+
nap (1.1.0)
72+
netrc (0.11.0)
73+
public_suffix (4.0.7)
74+
rexml (3.2.6)
75+
ruby-macho (2.5.1)
76+
typhoeus (1.4.0)
77+
ethon (>= 0.9.0)
78+
tzinfo (2.0.6)
79+
concurrent-ruby (~> 1.0)
80+
xcodeproj (1.22.0)
81+
CFPropertyList (>= 2.3.3, < 4.0)
82+
atomos (~> 0.1.3)
83+
claide (>= 1.0.2, < 2.0)
84+
colored2 (~> 3.1)
85+
nanaimo (~> 0.3.0)
86+
rexml (~> 3.2.4)
87+
88+
PLATFORMS
89+
ruby
90+
91+
DEPENDENCIES
92+
cocoapods (~> 1.11, >= 1.11.2)
93+
94+
RUBY VERSION
95+
ruby 2.7.5p203
96+
97+
BUNDLED WITH
98+
2.1.4

example/android/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ dependencies {
254254
//noinspection GradleDynamicVersion
255255
implementation "com.facebook.react:react-native:+" // From node_modules
256256

257-
implementation "com.clevertap.android:clevertap-android-sdk:4.7.5"
257+
implementation "com.clevertap.android:clevertap-android-sdk:5.2.0"
258258

259-
implementation "com.clevertap.android:clevertap-signedcall-sdk:0.0.2"
259+
implementation "com.clevertap.android:clevertap-signedcall-sdk:0.0.4"
260260
implementation('io.socket:socket.io-client:2.1.0') {
261261
exclude group: 'org.json', module: 'json'
262262
}

example/ios/ClevertapSignedCallReactNativeExample.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268
);
269269
runOnlyForDeploymentPostprocessing = 0;
270270
shellPath = /bin/sh;
271-
shellScript = "export NODE_BINARY=/Users/sonal/.nvm/versions/node/v18.13.0/bin/node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
271+
shellScript = "export NODE_BINARY=/Users/kushagra/.nvm/versions/node/v20.5.0/bin/node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
272272
};
273273
00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = {
274274
isa = PBXShellScriptBuildPhase;

example/ios/ClevertapSignedCallReactNativeExample.xcworkspace/contents.xcworkspacedata

-10
This file was deleted.

example/ios/ClevertapSignedCallReactNativeExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

-8
This file was deleted.

example/ios/ClevertapSignedCallReactNativeExample/AppDelegate.mm

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
6262

6363
SignedCall.cleverTapInstance = [CleverTap sharedInstance];
6464
[SignedCall setIsLoggingEnabled: YES];
65-
[SignedCall registerVoIPWithRootView:self.window.rootViewController appName:@"Sample App"];
65+
[SignedCall registerVoIPWithAppName:@"Sample App"];
66+
[SignedCall setRootViewController:self.window.rootViewController];
6667

6768
[self.window makeKeyAndVisible];
6869
return YES;

example/ios/ClevertapSignedCallReactNativeExample/Info.plist

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleVersion</key>
24-
<string>4</string>
24+
<string>1</string>
2525
<key>CleverTapAccountID</key>
2626
<string>CLEVERTAP_ACCOUNT_ID</string>
2727
<key>CleverTapToken</key>
28-
<string>CLEVERTAP_ACCOUNT_TOKEN</string>
28+
<string>CLEVERTAP_TOKEN</string>
29+
<key>CleverTapRegion</key>
30+
<string>CLEVERTAP_REGION</string>
2931
<key>LSRequiresIPhoneOS</key>
3032
<true/>
3133
<key>NSAppTransportSecurity</key>

0 commit comments

Comments
 (0)