Skip to content

Commit 7de85a3

Browse files
Merge pull request #760 from CleverTap/develop_7.1.1
Release core 7.1.3 SDK-4446
2 parents 1dc547d + 655e952 commit 7de85a3

File tree

17 files changed

+46
-134
lines changed

17 files changed

+46
-134
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## CHANGE LOG.
22

3+
### February 28, 2025
4+
* [CleverTap Android SDK v7.1.3](docs/CTCORECHANGELOG.md)
5+
36
### January 29, 2025
47
* [CleverTap Android SDK v7.1.2](docs/CTCORECHANGELOG.md)
58

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ We publish the SDK to `mavenCentral` as an `AAR` file. Just declare it as depend
2626

2727
```groovy
2828
dependencies {
29-
implementation "com.clevertap.android:clevertap-android-sdk:7.1.2"
29+
implementation "com.clevertap.android:clevertap-android-sdk:7.1.3"
3030
}
3131
```
3232

3333
Alternatively, you can download and add the AAR file included in this repo in your Module libs directory and tell gradle to install it like this:
3434

3535
```groovy
3636
dependencies {
37-
implementation (name: "clevertap-android-sdk-7.1.2", ext: 'aar')
37+
implementation (name: "clevertap-android-sdk-7.1.3", ext: 'aar')
3838
}
3939
```
4040

@@ -46,7 +46,7 @@ Add the Firebase Messaging library and Android Support Library v4 as dependencie
4646

4747
```groovy
4848
dependencies {
49-
implementation "com.clevertap.android:clevertap-android-sdk:7.1.2"
49+
implementation "com.clevertap.android:clevertap-android-sdk:7.1.3"
5050
implementation "androidx.core:core:1.9.0"
5151
implementation "com.google.firebase:firebase-messaging:23.0.6"
5252
implementation "com.google.android.gms:play-services-ads:23.6.0" // Required only if you enable Google ADID collection in the SDK (turned off by default).

clevertap-core/consumer-rules.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# For CleverTap SDK's
22
-keep class com.clevertap.android.sdk.pushnotification.fcm.FcmPushProvider{*;}
3-
-keep class com.clevertap.android.hms.HmsPushProvider{*;}
43
-keep class com.google.firebase.messaging.FirebaseMessagingService{*;}
54
-keep class com.clevertap.android.sdk.pushnotification.CTNotificationIntentService{*;}
65
-keep class com.google.android.exoplayer2.ExoPlayer{*;}
@@ -15,6 +14,5 @@
1514
public static final ** CREATOR;
1615
}
1716
-dontwarn com.clevertap.android.sdk.**
18-
-dontwarn com.baidu.**
1917
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,
2018
SourceFile,LineNumberTable,*Annotation*,EnclosingMethod

clevertap-core/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,20 +2360,6 @@ public CTProductConfigController productConfig() {
23602360
return coreState.getCtProductConfigController(context);
23612361
}
23622362

2363-
/**
2364-
* Sends the Baidu registration ID to CleverTap.
2365-
*
2366-
* @param regId The Baidu registration ID
2367-
* @param register Boolean indicating whether to register
2368-
* or not for receiving push messages from CleverTap.
2369-
* Set this to true to receive push messages from CleverTap,
2370-
* and false to not receive any messages from CleverTap.
2371-
*/
2372-
@SuppressWarnings("unused")
2373-
public void pushBaiduRegistrationId(String regId, boolean register) {
2374-
coreState.getPushProviders().handleToken(regId, PushType.BPS, register);
2375-
}
2376-
23772363
/**
23782364
* Push Charged event, which describes a purchase made.
23792365
*
@@ -2519,20 +2505,6 @@ public Future<?> pushGeofenceEnteredEvent(JSONObject geofenceProperties) {
25192505
.raiseEventForGeofences(Constants.GEOFENCE_ENTERED_EVENT_NAME, geofenceProperties);
25202506
}
25212507

2522-
/**
2523-
* Sends the Huawei registration ID to CleverTap.
2524-
*
2525-
* @param regId The Huawei registration ID
2526-
* @param register Boolean indicating whether to register
2527-
* or not for receiving push messages from CleverTap.
2528-
* Set this to true to receive push messages from CleverTap,
2529-
* and false to not receive any messages from CleverTap.
2530-
*/
2531-
@SuppressWarnings("unused")
2532-
public void pushHuaweiRegistrationId(String regId, boolean register) {
2533-
coreState.getPushProviders().handleToken(regId, PushType.HPS, register);
2534-
}
2535-
25362508
/**
25372509
* Pushes the Notification Clicked event for App Inbox to CleverTap.
25382510
*
@@ -3092,20 +3064,6 @@ private void manifestAsyncValidation() {
30923064
});
30933065
}
30943066

3095-
/**
3096-
* Sends the ADM registration ID to CleverTap.
3097-
*
3098-
* @param token The ADM registration ID
3099-
* @param register Boolean indicating whether to register
3100-
* or not for receiving push messages from CleverTap.
3101-
* Set this to true to receive push messages from CleverTap,
3102-
* and false to not receive any messages from CleverTap.
3103-
*/
3104-
@SuppressWarnings("unused")
3105-
private void pushAmazonRegistrationId(String token, boolean register) {
3106-
coreState.getPushProviders().handleToken(token, PushType.ADM, register);
3107-
}
3108-
31093067
static void onActivityCreated(Activity activity) {
31103068
onActivityCreated(activity, null);
31113069
}

clevertap-core/src/main/java/com/clevertap/android/sdk/interfaces/INotificationParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public interface INotificationParser<T> {
1111

1212
/**
1313
* Parses notification message to Bundle
14-
* @param message notification message received from cloud messaging provider like firebase,huawei etc.
14+
* @param message notification message received from cloud messaging provider like firebase etc.
1515
* @return {@link Bundle} object
1616
*/
1717
Bundle toBundle(@NonNull T message);

clevertap-core/src/main/java/com/clevertap/android/sdk/interfaces/IPushAmpHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public interface IPushAmpHandler<T> {
1515
/**
1616
* Processes notification message for Pull Notifications
1717
* @param context application context
18-
* @param message notification message received from cloud messaging provider like firebase,huawei etc.
18+
* @param message notification message received from cloud messaging provider like firebase etc.
1919
*/
2020
void processPushAmp(final Context context, @NonNull final T message);
2121
}

clevertap-core/src/main/java/com/clevertap/android/sdk/pushnotification/CTPushProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@ public interface CTPushProvider {
4848
* Requests the push registration token.
4949
*/
5050
void requestToken();
51-
5251
}

clevertap-core/src/main/java/com/clevertap/android/sdk/pushnotification/PushConstants.java

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,38 @@
88

99
public interface PushConstants {
1010

11-
@StringDef({FCM_DELIVERY_TYPE, HMS_DELIVERY_TYPE, BAIDU_DELIVERY_TYPE, ADM_DELIVERY_TYPE})
11+
@StringDef({FCM_DELIVERY_TYPE})
1212
@Retention(RetentionPolicy.SOURCE)
1313
@interface DeliveryType {
1414

1515
}
1616

17-
@StringDef({CT_FIREBASE_PROVIDER_CLASS, CT_BAIDU_PROVIDER_CLASS,
18-
CT_HUAWEI_PROVIDER_CLASS, CT_ADM_PROVIDER_CLASS})
17+
@StringDef({CT_FIREBASE_PROVIDER_CLASS})
1918
@Retention(RetentionPolicy.SOURCE)
2019
@interface CTPushProviderClass {
2120

2221
}
2322

24-
@StringDef({FIREBASE_SDK_CLASS, BAIDU_SDK_CLASS, HUAWEI_SDK_CLASS, ADM_SDK_CLASS})
23+
@StringDef({FIREBASE_SDK_CLASS})
2524
@Retention(RetentionPolicy.SOURCE)
2625
@interface PushMessagingClass {
2726

2827
}
2928

30-
@StringDef({FCM_PROPERTY_REG_ID, HPS_PROPERTY_REG_ID, BPS_PROPERTY_REG_ID,
31-
ADM_PROPERTY_REG_ID})
29+
@StringDef({FCM_PROPERTY_REG_ID})
3230
@Retention(RetentionPolicy.SOURCE)
3331
@interface RegKeyType {
3432

3533
}
3634

37-
@IntDef({ANDROID_PLATFORM, AMAZON_PLATFORM})
35+
@IntDef({ANDROID_PLATFORM})
3836
@Retention(RetentionPolicy.SOURCE)
3937
@interface Platform {
4038

4139
}
4240

4341
enum PushType {
44-
FCM(FCM_DELIVERY_TYPE, FCM_PROPERTY_REG_ID, CT_FIREBASE_PROVIDER_CLASS, FIREBASE_SDK_CLASS),
45-
HPS(HMS_DELIVERY_TYPE, HPS_PROPERTY_REG_ID, CT_HUAWEI_PROVIDER_CLASS, HUAWEI_SDK_CLASS),
46-
BPS(BAIDU_DELIVERY_TYPE, BPS_PROPERTY_REG_ID, CT_BAIDU_PROVIDER_CLASS, BAIDU_SDK_CLASS),
47-
ADM(ADM_DELIVERY_TYPE, ADM_PROPERTY_REG_ID, CT_ADM_PROVIDER_CLASS, ADM_SDK_CLASS);
42+
FCM(FCM_DELIVERY_TYPE, FCM_PROPERTY_REG_ID, CT_FIREBASE_PROVIDER_CLASS, FIREBASE_SDK_CLASS);
4843

4944
private final String ctProviderClassName;
5045

@@ -54,8 +49,12 @@ enum PushType {
5449

5550
private final String type;
5651

57-
PushType(@DeliveryType String type, @RegKeyType String prefKey, @CTPushProviderClass String className,
58-
@PushMessagingClass String messagingSDKClassName) {
52+
PushType(
53+
@DeliveryType String type,
54+
@RegKeyType String prefKey,
55+
@CTPushProviderClass String className,
56+
@PushMessagingClass String messagingSDKClassName
57+
) {
5958
this.type = type;
6059
this.tokenPrefKey = prefKey;
6160
this.ctProviderClassName = className;
@@ -94,29 +93,11 @@ String toString() {
9493
@NonNull
9594
String FCM_DELIVERY_TYPE = "fcm";
9695
@NonNull
97-
String BAIDU_DELIVERY_TYPE = "bps";
98-
@NonNull
99-
String HMS_DELIVERY_TYPE = "hps";
100-
@NonNull
101-
String ADM_DELIVERY_TYPE = "adm";
10296
String CT_FIREBASE_PROVIDER_CLASS = "com.clevertap.android.sdk.pushnotification.fcm.FcmPushProvider";
103-
String CT_BAIDU_PROVIDER_CLASS = "com.clevertap.android.bps.BaiduPushProvider";
104-
String CT_HUAWEI_PROVIDER_CLASS = "com.clevertap.android.hms.HmsPushProvider";
105-
String CT_ADM_PROVIDER_CLASS = "com.clevertap.android.adm.AmazonPushProvider";
10697
String FIREBASE_SDK_CLASS = "com.google.firebase.messaging.FirebaseMessagingService";
107-
String BAIDU_SDK_CLASS = "com.baidu.android.pushservice.PushMessageReceiver";
108-
String HUAWEI_SDK_CLASS = "com.huawei.hms.push.HmsMessageService";
109-
String ADM_SDK_CLASS = "com.amazon.device.messaging.ADM";
11098
String FCM_PROPERTY_REG_ID = "fcm_token";
111-
String BPS_PROPERTY_REG_ID = "bps_token";
112-
String HPS_PROPERTY_REG_ID = "hps_token";
113-
String ADM_PROPERTY_REG_ID = "adm_token";
11499
/**
115100
* Android platform type. Only GCM transport will be allowed.
116101
*/
117102
int ANDROID_PLATFORM = 1;
118-
/**
119-
* Amazon platform type. Only ADM transport will be allowed.
120-
*/
121-
int AMAZON_PLATFORM = 2;
122103
}

clevertap-core/src/main/java/com/clevertap/android/sdk/pushnotification/PushNotificationHandler.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import static com.clevertap.android.sdk.pushnotification.PushConstants.LOG_TAG;
44
import static com.clevertap.android.sdk.pushnotification.PushConstants.PushType.FCM;
5-
import static com.clevertap.android.sdk.pushnotification.PushConstants.PushType.HPS;
65
import static com.clevertap.android.sdk.pushnotification.PushNotificationUtil.getAccountIdFromNotificationBundle;
76

87
import android.content.Context;
@@ -50,8 +49,11 @@ public boolean onActionButtonClick(final Context context, final Bundle extras, f
5049
}
5150

5251
@Override
53-
public synchronized boolean onMessageReceived(final Context applicationContext, final Bundle message,
54-
final String pushType) {
52+
public synchronized boolean onMessageReceived(
53+
final Context applicationContext,
54+
final Bundle message,
55+
final String pushType
56+
) {
5557
message.putLong(Constants.OMR_INVOKE_TIME_IN_MILLIS,System.currentTimeMillis());
5658
CleverTapAPI cleverTapAPI = CleverTapAPI
5759
.getGlobalInstance(applicationContext, getAccountIdFromNotificationBundle(message));
@@ -86,8 +88,6 @@ public synchronized boolean onMessageReceived(final Context applicationContext,
8688
public boolean onNewToken(final Context applicationContext, final String token, final String pushType) {
8789
if (pushType.equals(FCM.getType())) {
8890
CleverTapAPI.tokenRefresh(applicationContext, token, FCM);
89-
} else if (pushType.equals(HPS.getType())) {
90-
CleverTapAPI.tokenRefresh(applicationContext, token, HPS);
9191
}
9292
return true;
9393
}

clevertap-core/src/main/java/com/clevertap/android/sdk/pushnotification/PushProviders.java

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import com.clevertap.android.sdk.Logger;
3636
import com.clevertap.android.sdk.ManifestInfo;
3737
import com.clevertap.android.sdk.StorageHelper;
38-
import com.clevertap.android.sdk.Utils;
3938
import com.clevertap.android.sdk.db.BaseDatabaseManager;
4039
import com.clevertap.android.sdk.db.DBAdapter;
4140
import com.clevertap.android.sdk.interfaces.AudibleNotification;
@@ -59,10 +58,6 @@
5958
import org.json.JSONException;
6059
import org.json.JSONObject;
6160

62-
/**
63-
* Single point of contact to load & support all types of Notification messaging services viz. FCM, HMS etc.
64-
*/
65-
6661
@RestrictTo(Scope.LIBRARY_GROUP)
6762
public class PushProviders implements CTPushProviderListener {
6863

@@ -256,15 +251,6 @@ public void doTokenRefresh(String token, PushType pushType) {
256251
case FCM:
257252
handleToken(token, PushType.FCM, true);
258253
break;
259-
case HPS:
260-
handleToken(token, PushType.HPS, true);
261-
break;
262-
case BPS:
263-
handleToken(token, PushType.BPS, true);
264-
break;
265-
case ADM:
266-
handleToken(token, PushType.ADM, true);
267-
break;
268254
}
269255
}
270256

@@ -754,24 +740,12 @@ private boolean isValid(CTPushProvider provider) {
754740
"Provider: %s version %s does not match the SDK version %s. Make sure all CleverTap dependencies are the same version.");
755741
return false;
756742
}
757-
switch (provider.getPushType()) {
758-
case FCM:
759-
case HPS:
760-
case BPS:
761-
if (provider.getPlatform() != PushConstants.ANDROID_PLATFORM) {
762-
config.log(PushConstants.LOG_TAG, "Invalid Provider: " + provider.getClass() +
763-
" delivery is only available for Android platforms." + provider.getPushType());
764-
return false;
765-
}
766-
break;
767-
case ADM:
768-
if (provider.getPlatform() != PushConstants.AMAZON_PLATFORM) {
769-
config.log(PushConstants.LOG_TAG, "Invalid Provider: " +
770-
provider.getClass() +
771-
" ADM delivery is only available for Amazon platforms." + provider.getPushType());
772-
return false;
773-
}
774-
break;
743+
if (provider.getPushType() == PushType.FCM) {
744+
if (provider.getPlatform() != PushConstants.ANDROID_PLATFORM) {
745+
config.log(PushConstants.LOG_TAG, "Invalid Provider: " + provider.getClass() +
746+
" delivery is only available for Android platforms." + provider.getPushType());
747+
return false;
748+
}
775749
}
776750

777751
return true;

clevertap-core/src/main/java/com/clevertap/android/sdk/validation/ManifestValidator.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,6 @@ private static void checkReceiversServices(final Context context, PushProviders
8989
} catch (Exception e) {
9090
Logger.v("Receiver/Service issue : " + e.toString());
9191

92-
} catch (Error error) {
93-
Logger.v("FATAL : " + error.getMessage());
94-
}
95-
}else if(pushType == PushType.HPS){
96-
try {
97-
// use class name string directly here to avoid class not found issues on class import
98-
validateServiceInManifest((Application) context.getApplicationContext(),
99-
"com.clevertap.android.hms.CTHmsMessageService");
100-
} catch (Exception e) {
101-
Logger.v("Receiver/Service issue : " + e.toString());
102-
10392
} catch (Error error) {
10493
Logger.v("FATAL : " + error.getMessage());
10594
}

docs/CTCORECHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## CleverTap Android SDK CHANGE LOG
22

3+
### Version 7.1.3 (February 28, 2025)
4+
* Removes support for HMS, Baidu and Amazon push providers.
5+
> ⚠️ **NOTE**
6+
Don't upgrade to this version if using the HMS, Baidu or Amazon push providers. In the future, these push providers will be injected rather than reflected
7+
38
### Version 7.1.2 (January 29, 2025)
49
This release uses JDK17 to compile to support unity.
510

docs/CTGEOFENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Add the following dependencies to the `build.gradle`
1717

1818
```Groovy
1919
implementation "com.clevertap.android:clevertap-geofence-sdk:1.3.0"
20-
implementation "com.clevertap.android:clevertap-android-sdk:7.1.2" // 3.9.0 and above
20+
implementation "com.clevertap.android:clevertap-android-sdk:7.1.3" // 3.9.0 and above
2121
implementation "com.google.android.gms:play-services-location:21.0.0"
2222
implementation "androidx.work:work-runtime:2.7.1" // required for FETCH_LAST_LOCATION_PERIODIC
2323
implementation "androidx.concurrent:concurrent-futures:1.1.0" // required for FETCH_LAST_LOCATION_PERIODIC

docs/CTPUSHTEMPLATES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CleverTap Push Templates SDK helps you engage with your users using fancy push n
2121

2222
```groovy
2323
implementation "com.clevertap.android:push-templates:1.2.4"
24-
implementation "com.clevertap.android:clevertap-android-sdk:7.1.2" // 4.4.0 and above
24+
implementation "com.clevertap.android:clevertap-android-sdk:7.1.3" // 4.4.0 and above
2525
```
2626

2727
2. Add the following line to your Application class before the `onCreate()`

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ coroutines_test = "1.7.3"
5454
installreferrer = "2.2"
5555

5656
#SDK Versions
57-
clevertap_android_sdk = "7.1.2"
57+
clevertap_android_sdk = "7.1.3"
5858
clevertap_rendermax_sdk = "1.0.3"
5959
clevertap_geofence_sdk = "1.3.0"
6060
clevertap_hms_sdk = "1.3.4"

0 commit comments

Comments
 (0)