Skip to content
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

docs(SDK-3672) - Replaces Push Amplification with Pull Notifications … #567

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
* Use v3.8.2
* Adds support for Product Config and Feature Flag as a part of Product Experiences feature
* Fixed InApp center alignment issue for tablets
* Adds support for custom handling payload when using Push Amplification.
* Adds support for custom handling payload when using Pull Notifications.
* Other bug fixes

### Version 3.7.2 (March 27, 2020)
Expand Down Expand Up @@ -264,7 +264,7 @@
* Adds support for deep link query parameters in InApps.
* Deprecated GCM.
* Deprecated EventHandler, SessionHandler and DataHandler classes.
* Workaround for below Oreo Android OS bug causing ANRs while using Push Amplification.
* Workaround for below Oreo Android OS bug causing ANRs while using Pull Notifications.
* Bug fixes and performance improvements

### Version 3.5.1 (May 24, 2019)
Expand Down Expand Up @@ -294,7 +294,7 @@

### Version 3.4.0 (January 14, 2019)
* Adds support for App Inbox
* Adds support for Push Amplification
* Adds support for Pull Notifications
* Workaround for Android O orientation bug in Native InApps
* Fixes a bug which led to ANR on 2G network

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ CleverTapAPI getGlobalInstance(Context context, String _accountId) {
}

/**
* Pass Push Notification Payload to CleverTap for smooth functioning of Push Amplification
* Pass Push Notification Payload to CleverTap for smooth functioning of Pull Notifications
*
* @param context - Application Context
* @param extras - Bundle received via FCM/Push Amplification
* @param extras - Bundle received via FCM/Pull Notifications
*/
@SuppressWarnings("unused")
public static void processPushNotification(Context context, Bundle extras) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import androidx.annotation.NonNull;

/**
* Generic Interface to handle push amplification for different types of notification messages, received from
* Generic Interface to handle Pull Notifications for different types of notification messages, received from
* respective services or receivers(ex. FirebaseMessagingService).
* <br><br>
* Implement this interface if you want to support push amp for different types of notification messages.
Expand All @@ -13,7 +13,7 @@
public interface IPushAmpHandler<T> {

/**
* Processes notification message for push amplification
* Processes notification message for Pull Notifications
* @param context application context
* @param message notification message received from cloud messaging provider like firebase,xiaomi,huawei etc.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ public void onTokenRefresh() {
}

/**
* Stores silent push notification in DB for smooth working of Push Amplification
* Stores silent push notification in DB for smooth working of Pull Notifications
* Background Job Service and also stores wzrk_pid to the DB to avoid duplication of Push
* Notifications from Push Amplification.
* Notifications from Pull Notifications.
*
* @param extras - Bundle
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public boolean onNewToken(final Context applicationContext, final String token)
* {@inheritDoc}
* <br><br>
* Use this method if you are rendering notification by your own and wants to support your custom rendered
* notification for push amplification
* notification for Pull Notifications
*/
@Override
public void processPushAmp(final Context context, @NonNull final RemoteMessage message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public PushAmpResponse(

@Override
public void processResponse(final JSONObject response, final String stringBody, final Context context) {
//Handle Push Amplification response
//Handle Pull Notifications response
if (config.isAnalyticsOnly()) {
logger.verbose(config.getAccountId(),
"CleverTap instance is configured to analytics only, not processing push amp response");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public boolean onNewToken(Context context, final String token) {
* {@inheritDoc}
* <br><br>
* Use this method if you are rendering notification by your own and wants to support your custom rendered
* notification for push amplification
* notification for Pull Notifications
*/
@Override
public void processPushAmp(final Context context, @NonNull final RemoteMessage message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ int onReceiveRegisterResult(Context context, MiPushCommandMessage miPushCommandM
* {@inheritDoc}
* <br><br>
* Use this method if you are rendering notification by your own and wants to support your custom rendered
* notification for push amplification
* notification for Pull Notifications
*/
@Override
public void processPushAmp(final Context context, @NonNull final MiPushMessage message) {
Expand Down
4 changes: 2 additions & 2 deletions docs/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Upgrades AGP to 8.2.2 for building the SDK and adds related consumer proguard rules
* Deprecates Xiaomi public methods as we are sunsetting SDK. Details [here](https://dev.mi.com/distribute/doc/details?pId=1555).
* Adds Accessibility ids for UI components of SDK
* Migrates JobScheduler to WorkManager for Push Amplification.
* Migrates JobScheduler to WorkManager for Pull Notifications.

#### Breaking API Changes

Expand Down Expand Up @@ -299,7 +299,7 @@ Please remove the integrated Rendermax SDK before you upgrade to Android SDK v5.
Note : If you are facing `ClassNotFoundException` "org.jacoco.agent.rt.internal_28bab1d.Offline" after updating to 4.5.0, Please update the SDK to v4.5.1

### Version 4.4.0 (December 20, 2021)
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(FCM),Custom Push Amplification Handling and Push Templates
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(FCM),Custom Pull Notifications Handling and Push Templates
* `CTFcmMessageHandler().createNotification(applicationContext, message)`
* `CTFcmMessageHandler().processPushAmp(applicationContext, message)`
* `CleverTapAPI.setNotificationHandler(notificationHandler)`
Expand Down
2 changes: 1 addition & 1 deletion docs/CTHUAWEIPUSHCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Updated Huawei Push SDK to v6.3.0.304

### Version 1.2.0 (December 20, 2021)
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(HMS),Custom Push Amplification Handling and Push Templates.
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(HMS),Custom Pull Notifications Handling and Push Templates.
* `CTHmsMessageHandler().createNotification(applicationContext,message)`
* `CTHmsMessageHandler().processPushAmp(applicationContext,message)`
* Supports CleverTap Android SDK v4.4.0
Expand Down
2 changes: 1 addition & 1 deletion docs/CTPUSHTEMPLATESCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
### Version 1.0.0 (December 20, 2021)
* Stable release! 🎉
* Supports Xiaomi, Huawei notification messages out of the box
* Supports Push Amplification out of the box
* Supports Pull Notifications out of the box
* Supports Android 12
* Supports CleverTap Android SDK v4.4.0

Expand Down
6 changes: 3 additions & 3 deletions docs/CTV4CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* [Breaking changes](#%EF%B8%8F-breaking-changes)
* [Firebase Messaging changes](#-firebase-messaging-changes)
* [Push Notification changes](#-push-notification-changes)
* [Push Amplification changes](#-push-amplification-changes)
* [Pull Notifications changes](#-push-amplification-changes)
* [Questions](#-questions)

## ♻️ Migration
Expand Down Expand Up @@ -149,7 +149,7 @@ New `AndroidManifest.xml` entries

`com.clevertap.android.sdk.NotificationInfo` has been renamed to `com.clevertap.android.sdk.pushnotification.NotificationInfo`

### 📲 Push Amplification changes
### 📲 Pull Notifications changes

The following `AndroidManifest.xml` entries are no longer needed to be added -

Expand All @@ -170,7 +170,7 @@ The following `AndroidManifest.xml` entries are no longer needed to be added -
android:exported="false"/>
```

To enable Push Amplification only the following entry is required in the `AndroidManifest.xml` file -
To enable Pull Notifications only the following entry is required in the `AndroidManifest.xml` file -

```xml
<meta-data
Expand Down
2 changes: 1 addition & 1 deletion docs/CTXIAOMIPUSHCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ With the Mi Push service's closure, CleverTap will cease offering Mi Push suppor
* Updated Xiaomi Push SDK to v4.8.6

### Version 1.2.0 (December 20, 2021)
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(XPS),Custom Push Amplification Handling and Push Templates.
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(XPS),Custom Pull Notifications Handling and Push Templates.
* `CTXiaomiMessageHandler().createNotification(applicationContext,message)`
* `CTXiaomiMessageHandler().processPushAmp(applicationContext,message)`
* Supports CleverTap Android SDK v4.4.0
Expand Down
6 changes: 3 additions & 3 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,11 @@ context,messageBundle, "https://www.pushicons.com/icon",
}
```

#### Push Amplification
#### Pull Notifications

Starting with v3.4.0, the SDK supports Push Amplification. Push Amplification is a capability that
Starting with v3.4.0, the SDK supports Pull Notifications. Pull Notifications is a capability that
allows you to reach users on devices which suppress notifications via GCM/FCM. To allow your app to
use CleverTap's Push Amplification via background ping service, add the following fields in your
use CleverTap's Pull Notifications via background ping service, add the following fields in your
app's `AndroidManifest.xml`

```xml
Expand Down
4 changes: 2 additions & 2 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* First ensure that your CleverTap push notifications integration is working properly as described in [this guide](https://developer.clevertap.com/docs/android#section-push-notifications).<br>
* For Android 6.0 or higher due to [Doze-Standby](https://developer.android.com/training/monitoring-device-state/doze-standby) and For Android 9.0 or higher due to [App standby buckets](https://developer.android.com/topic/performance/appstandby) network connectivity for apps gets deferred by some time as described [here in Network Column](https://developer.android.com/topic/performance/power/power-details) which prevents SDK to connect to CleverTap servers for raising notifications.

7. When minifying is enabled for gradle wrapper 8.0+ and android gradle plugin 8.0.0+, R8 reports missing classes as errors (previously those were warnings) and the build fails.
7. Why does the build fail for an app when minifying is enabled for gradle wrapper 8.0+ and android gradle plugin 8.0.0+?

* Upgrade to `com.clevertap.android:clevertap-android-sdk` v6.1.0 and `com.clevertap.android:clevertap-hms-sdk` v1.3.4 to fix this issue.
* This occurs due to change in behaviour in the AGP`
When R8 traces the program it will try to handle all the classes, methods and fields that it finds in the part of the program it considers live. Earlier during this tracing, it threw a warning which allowed building the apk. But these are now converted into errors. Details [here](https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes)
* Upgrade to `com.clevertap.android:clevertap-android-sdk` v6.1.0 and `com.clevertap.android:clevertap-hms-sdk` v1.3.4 to fix this issue.
4 changes: 2 additions & 2 deletions templates/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Upgrades AGP to 8.2.2 for building the SDK and adds related consumer proguard rules
* Deprecates Xiaomi public methods as we are sunsetting SDK. Details [here](https://dev.mi.com/distribute/doc/details?pId=1555).
* Adds Accessibility ids for UI components of SDK
* Migrates JobScheduler to WorkManager for Push Amplification.
* Migrates JobScheduler to WorkManager for Pull Notifications.

#### Breaking API Changes

Expand Down Expand Up @@ -299,7 +299,7 @@ Please remove the integrated Rendermax SDK before you upgrade to Android SDK v5.
Note : If you are facing `ClassNotFoundException` "org.jacoco.agent.rt.internal_28bab1d.Offline" after updating to 4.5.0, Please update the SDK to v4.5.1

### Version 4.4.0 (December 20, 2021)
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(FCM),Custom Push Amplification Handling and Push Templates
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(FCM),Custom Pull Notifications Handling and Push Templates
* `CTFcmMessageHandler().createNotification(applicationContext, message)`
* `CTFcmMessageHandler().processPushAmp(applicationContext, message)`
* `CleverTapAPI.setNotificationHandler(notificationHandler)`
Expand Down
2 changes: 1 addition & 1 deletion templates/CTHUAWEIPUSHCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* Updated Huawei Push SDK to v6.3.0.304

### Version 1.2.0 (December 20, 2021)
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(HMS),Custom Push Amplification Handling and Push Templates.
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(HMS),Custom Pull Notifications Handling and Push Templates.
* `CTHmsMessageHandler().createNotification(applicationContext,message)`
* `CTHmsMessageHandler().processPushAmp(applicationContext,message)`
* Supports CleverTap Android SDK v4.4.0
Expand Down
2 changes: 1 addition & 1 deletion templates/CTPUSHTEMPLATESCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
### Version 1.0.0 (December 20, 2021)
* Stable release! 🎉
* Supports Xiaomi, Huawei notification messages out of the box
* Supports Push Amplification out of the box
* Supports Pull Notifications out of the box
* Supports Android 12
* Supports CleverTap Android SDK v4.4.0

Expand Down
6 changes: 3 additions & 3 deletions templates/CTV4CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* [Breaking changes](#%EF%B8%8F-breaking-changes)
* [Firebase Messaging changes](#-firebase-messaging-changes)
* [Push Notification changes](#-push-notification-changes)
* [Push Amplification changes](#-push-amplification-changes)
* [Pull Notifications changes](#-push-amplification-changes)
* [Questions](#-questions)

## ♻️ Migration
Expand Down Expand Up @@ -149,7 +149,7 @@ New `AndroidManifest.xml` entries

`com.clevertap.android.sdk.NotificationInfo` has been renamed to `com.clevertap.android.sdk.pushnotification.NotificationInfo`

### 📲 Push Amplification changes
### 📲 Pull Notifications changes

The following `AndroidManifest.xml` entries are no longer needed to be added -

Expand All @@ -170,7 +170,7 @@ The following `AndroidManifest.xml` entries are no longer needed to be added -
android:exported="false"/>
```

To enable Push Amplification only the following entry is required in the `AndroidManifest.xml` file -
To enable Pull Notifications only the following entry is required in the `AndroidManifest.xml` file -

```xml
<meta-data
Expand Down
2 changes: 1 addition & 1 deletion templates/CTXIAOMIPUSHCHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ With the Mi Push service's closure, CleverTap will cease offering Mi Push suppor
* Updated Xiaomi Push SDK to v4.8.6

### Version 1.2.0 (December 20, 2021)
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(XPS),Custom Push Amplification Handling and Push Templates.
* Adds below new public APIs for smooth and easy integration of Custom Android Push Notifications Handling(XPS),Custom Pull Notifications Handling and Push Templates.
* `CTXiaomiMessageHandler().createNotification(applicationContext,message)`
* `CTXiaomiMessageHandler().processPushAmp(applicationContext,message)`
* Supports CleverTap Android SDK v4.4.0
Expand Down
6 changes: 3 additions & 3 deletions templates/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,11 +468,11 @@ context,messageBundle, "https://www.pushicons.com/icon",
}
```

#### Push Amplification
#### Pull Notifications

Starting with v3.4.0, the SDK supports Push Amplification. Push Amplification is a capability that
Starting with v3.4.0, the SDK supports Pull Notifications. Pull Notifications is a capability that
allows you to reach users on devices which suppress notifications via GCM/FCM. To allow your app to
use CleverTap's Push Amplification via background ping service, add the following fields in your
use CleverTap's Pull Notifications via background ping service, add the following fields in your
app's `AndroidManifest.xml`

```xml
Expand Down
4 changes: 2 additions & 2 deletions templates/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
* First ensure that your CleverTap push notifications integration is working properly as described in [this guide](https://developer.clevertap.com/docs/android#section-push-notifications).<br>
* For Android 6.0 or higher due to [Doze-Standby](https://developer.android.com/training/monitoring-device-state/doze-standby) and For Android 9.0 or higher due to [App standby buckets](https://developer.android.com/topic/performance/appstandby) network connectivity for apps gets deferred by some time as described [here in Network Column](https://developer.android.com/topic/performance/power/power-details) which prevents SDK to connect to CleverTap servers for raising notifications.

7. When minifying is enabled for gradle wrapper 8.0+ and android gradle plugin 8.0.0+, R8 reports missing classes as errors (previously those were warnings) and the build fails.
7. Why does the build fail for an app when minifying is enabled for gradle wrapper 8.0+ and android gradle plugin 8.0.0+?

* Upgrade to `com.clevertap.android:clevertap-android-sdk` v6.1.0 and `com.clevertap.android:clevertap-hms-sdk` v1.3.4 to fix this issue.
* This occurs due to change in behaviour in the AGP`
When R8 traces the program it will try to handle all the classes, methods and fields that it finds in the part of the program it considers live. Earlier during this tracing, it threw a warning which allowed building the apk. But these are now converted into errors. Details [here](https://developer.android.com/build/releases/past-releases/agp-8-0-0-release-notes)
* Upgrade to `com.clevertap.android:clevertap-android-sdk` v6.1.0 and `com.clevertap.android:clevertap-hms-sdk` v1.3.4 to fix this issue.