Skip to content

Commit

Permalink
Merge pull request #401 from CleverTap/task/SDK-2779/update_android12…
Browse files Browse the repository at this point in the history
…_sdk

Release core v4.6.7 push-templates v1.0.5.1
  • Loading branch information
piyush-kukadiya authored Mar 15, 2023
2 parents 2ab6a9e + d3ff7f3 commit 288a130
Show file tree
Hide file tree
Showing 18 changed files with 212 additions and 19 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## CHANGE LOG.

### March 14, 2023
* [CleverTap Android SDK v4.6.7](https://github.com/CleverTap/clevertap-android-sdk/blob/master_android12/docs/CTCORECHANGELOG.md)
* [CleverTap Push Templates SDK v1.0.5.1](https://github.com/CleverTap/clevertap-android-sdk/blob/master_android12/docs/CTPUSHTEMPLATESCHANGELOG.md). CleverTap Push Templates SDK `v1.0.5.1` requires [CleverTap Android SDK v4.6.7](https://github.com/CleverTap/clevertap-android-sdk/blob/master_android12/docs/CTCORECHANGELOG.md) to work properly.
* **Note:** This release is being done for Android 12 targeted users, satisfying below points.
* Targeting Android 12 and
* Using RenderMax and/or using Push Templates

### March 6, 2023
* [CleverTap RenderMax SDK v1.0.3](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTRENDERMAXCHANGELOG.md)

### October 31, 2022
* [CleverTap Android SDK v4.6.6](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md)

Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ We publish the SDK to `mavenCentral` as an `AAR` file. Just declare it as depend

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-android-sdk:4.6.6"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.7"
}
```

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:

```groovy
dependencies {
implementation (name: "clevertap-android-sdk-4.6.6", ext: 'aar')
implementation (name: "clevertap-android-sdk-4.6.7", ext: 'aar')
}
```

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

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-android-sdk:4.6.6"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.7"
implementation "androidx.core:core:1.3.0"
implementation "com.google.firebase:firebase-messaging:21.0.0"
implementation "com.google.android.gms:play-services-ads:19.4.0" // Required only if you enable Google ADID collection in the SDK (turned off by default).
Expand Down Expand Up @@ -190,6 +190,12 @@ CleverTap Huawei Push SDK provides an out of the box service to use the Huawei M
CleverTap Push Templates SDK helps you engage with your users using fancy push notification templates built specifically to work with [CleverTap](https://www.clevertap.com).
Find the integration steps for the CleverTap Push Templates SDK [here](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTPUSHTEMPLATES.md)

## 📲 CleverTap RenderMax SDK
[(Back to top)](#-table-of-contents)

RenderMax SDK delivers and renders notifications on the user's device even if the FCM delivery fails or the device is optimized for battery consumption.
Find the integration steps for the CleverTap RenderMax SDK [here](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTRENDERMAX.md)

## 📄 License
[(Back to top)](#-table-of-contents)
CleverTap Android SDK is MIT licensed, as found in the [LICENSE](https://github.com/CleverTap/clevertap-android-sdk/blob/master/LICENSE) file.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ task copyTemplates {
file("versions.properties").withInputStream { props.load(it) }
outputs.upToDateWhen { false }
props.put("clevertap_android_sdk",Libs.clevertap_android_sdk.dropRight(1))
props.put("clevertap_rendermax_sdk", Libs.clevertap_rendermax_sdk.dropRight(1))
props.put("clevertap_geofence_sdk",Libs.clevertap_geofence_sdk.dropRight(1))
props.put("clevertap_hms_sdk",Libs.clevertap_hms_sdk.dropRight(1))
props.put("clevertap_xiaomi_sdk",Libs.clevertap_xiaomi_sdk.dropRight(1))
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ object Libs {

const val clevertap_android_sdk: String = "com.clevertap.android:clevertap-android-sdk:_"

const val clevertap_rendermax_sdk: String = "com.clevertap.android:clevertap-rendermax-sdk:_"

const val clevertap_geofence_sdk: String = "com.clevertap.android:clevertap-geofence-sdk:_"

const val clevertap_hms_sdk: String = "com.clevertap.android:clevertap-hms-sdk:_"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2882,14 +2882,15 @@ public Void call() throws Exception {
}

//TODO: start synchronizing entire flow from here
public void renderPushNotification(@NonNull INotificationRenderer iNotificationRenderer, Context context,
public Future<?> renderPushNotification(@NonNull INotificationRenderer iNotificationRenderer, Context context,
Bundle extras) {

CleverTapInstanceConfig config = coreState.getConfig();
Future<?> future = null;

try {
Task<Void> task = CTExecutorFactory.executors(config).postAsyncSafelyTask();
task.execute("CleverTapAPI#renderPushNotification",
future = task.submit("CleverTapAPI#renderPushNotification",
new Callable<Void>() {
@Override
public Void call() {
Expand All @@ -2898,9 +2899,11 @@ public Void call() {

if (extras != null && extras.containsKey(Constants.PT_NOTIF_ID)) {
coreState.getPushProviders()
._createNotification(context, extras, extras.getInt(Constants.PT_NOTIF_ID));
._createNotification(context, extras,
extras.getInt(Constants.PT_NOTIF_ID));
} else {
coreState.getPushProviders()._createNotification(context, extras, Constants.EMPTY_NOTIFICATION_ID);
coreState.getPushProviders()
._createNotification(context, extras, Constants.EMPTY_NOTIFICATION_ID);
}
}
return null;
Expand All @@ -2910,6 +2913,8 @@ public Void call() {
config.getLogger().debug(config.getAccountId(), "Failed to process renderPushNotification()", t);
}

return future;

}

/**
Expand Down
6 changes: 6 additions & 0 deletions docs/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## CleverTap Android SDK CHANGE LOG

### Version 4.6.7 (March 14, 2023)
* Bug fixes and performance improvements.
* **Note:** This release is being done for Android 12 targeted users, satisfying below points.
* Targeting Android 12 and
* Using RenderMax and/or using Push Templates

### Version 4.6.6 (October 31, 2022)
* Fixes App Inbox bug where an Inbox message's video would not play when new Inbox messages were available

Expand Down
2 changes: 1 addition & 1 deletion docs/CTGEOFENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Add the following dependencies to the `build.gradle`

```Groovy
implementation "com.clevertap.android:clevertap-geofence-sdk:1.1.0"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.6" // 3.9.0 and above
implementation "com.clevertap.android:clevertap-android-sdk:4.6.7" // 3.9.0 and above
implementation "com.google.android.gms:play-services-location:18.0.0"
implementation "androidx.work:work-runtime:2.7.0" // required for FETCH_LAST_LOCATION_PERIODIC
implementation "androidx.concurrent:concurrent-futures:1.1.0" // required for FETCH_LAST_LOCATION_PERIODIC
Expand Down
4 changes: 2 additions & 2 deletions docs/CTPUSHTEMPLATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ CleverTap Push Templates SDK helps you engage with your users using fancy push n
1. Add the dependencies to the `build.gradle`

```groovy
implementation "com.clevertap.android:push-templates:1.0.5"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.6" // 4.4.0 and above
implementation "com.clevertap.android:push-templates:1.0.5.1"
implementation "com.clevertap.android:clevertap-android-sdk:4.6.7" // 4.4.0 and above
```

2. Add the following line to your Application class before the `onCreate()`
Expand Down
6 changes: 6 additions & 0 deletions docs/CTPUSHTEMPLATESCHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## CleverTap Push Templates SDK CHANGE LOG

### Version 1.0.5.1 (March 14, 2023)
* Supports CleverTap Android SDK v4.6.7. CleverTap Push Templates SDK `v1.0.5.1` requires [CleverTap Android SDK v4.6.7](https://github.com/CleverTap/clevertap-android-sdk/blob/master_android12/docs/CTCORECHANGELOG.md) to work properly.
* **Note:** This release is being done for Android 12 targeted users, satisfying below points.
* Targeting Android 12 and
* Using RenderMax and/or using Push Templates

### Version 1.0.5 (September 13, 2022)
* fixes a bug on android 12 where push template notification header was not displaying subtitle text.

Expand Down
51 changes: 51 additions & 0 deletions docs/CTRENDERMAX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<p align="center">
<img src="https://github.com/CleverTap/clevertap-ios-sdk/blob/master/docs/images/clevertap-logo.png" height="220"/>
</p>

# RenderMax by CleverTap

RenderMax SDK delivers and renders notifications on the user's device even if the FCM delivery fails or the device is optimized for battery consumption.

# Table of contents

- [Installation](#installation)
- [Developer Notes](#developer-notes)
- [Proguard](#proguard)
- [Changelog](#changelog)

# Installation

[(Back to top)](#table-of-contents)

To use CleverTap's RenderMax SDK with your app, add the following code snippet in the `build.gradle` of the app.

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-rendermax-sdk:1.0.3"
}
```

# Developer Notes

[(Back to top)](#table-of-contents)

* The RenderMax SDK is supported for Android SDK `v4.6.6`, React Native SDK `v0.9.3`, Flutter SDK `v1.5.5` and above.
* If the app is custom rendering the push notification and not passing the payload to CleverTap SDK, add the following code before you render the notification:

```
CleverTapAPI.processPushNotification(getApplicationContext(),extras);
```

# Proguard

[(Back to top)](#table-of-contents)

RenderMax SDK is distributed as obfuscated package and for it's smooth working with proguard you must add necessary rules.
The good news is that, Proguard rules for RenderMax SDK is provided out of the box through `consumer-rules.pro` which gets merged with App's Proguard rule so you don't have to do anything here.
Thanks to `consumer-rules.pro`. You can check RenderMax Proguard rules in your `/build/outputs/mapping/configuration.txt` by searching RenderMax keyword.

# Changelog

[(Back to top)](#table-of-contents)

Changelog can be found [here](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTRENDERMAXCHANGELOG.md)
15 changes: 15 additions & 0 deletions docs/CTRENDERMAXCHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## CleverTap RenderMax SDK CHANGE LOG

### Version 1.0.3 (March 6, 2023)
* Fix ANR while receiving push through RenderMax
* Fix crash - java.lang.IllegalStateException

### Version 1.0.2 (January 25, 2023)
* Fix [runtime exception](https://github.com/CleverTap/clevertap-android-sdk/issues/379)

### Version 1.0.1 (December 14, 2022)
* Internal improvements.

### Version 1.0.0 (November 30, 2022)
* Initial release! 🎉
* Supports CleverTap Android SDK `v4.6.6`
18 changes: 13 additions & 5 deletions gradle-scripts/commons.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ ext["sonatypeStagingProfileId"] = ''
version = libraryVersion
group = publishedGroupId

def (major,minor,patch) = libraryVersion.split("\\.")
def build = null
def versionArr = libraryVersion.split("\\.")
def (major, minor, patch) = versionArr
if (versionArr.size() > 3) {
build = versionArr[3]
}

android {
compileSdkVersion Android.compileSdkVersionVal
Expand All @@ -36,11 +41,14 @@ android {
minSdkVersion minSdkVersionVal
targetSdkVersion Android.targetSdkVersionVal
versionCode "${major}0${minor}0${patch}".toInteger()
if (build != null) {
versionCode "${versionCode}0${build}".toInteger()
}
versionName libraryVersion

//AGP 4.1.0 change https://developer.android.com/studio/releases/gradle-plugin#version_properties_removed_from_buildconfig_class_in_library_projects
buildConfigField ("int", "VERSION_CODE", "$versionCode")
buildConfigField ("String", "VERSION_NAME", "\"$versionName\"")
buildConfigField("int", "VERSION_CODE", "$versionCode")
buildConfigField("String", "VERSION_NAME", "\"$versionName\"")

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand All @@ -52,14 +60,14 @@ android {
System.out.println("coverage="+coverage)
testCoverageEnabled (coverage) //To get coverage reports for instrumentation tests
buildConfigField "String", "SDK_VERSION_STRING",
"\"!SDK-VERSION-STRING!:$publishedGroupId:$artifact:$major.$minor.$patch.0\""
"\"!SDK-VERSION-STRING!:$publishedGroupId:$artifact:$major.$minor.$patch.${build == null ? 0 : build}\""
}
release {
Boolean coverage = project.hasProperty('coverage') //only true when a command is run with argument, like this : `gradle <command> -Pcoverage='true'`
System.out.println("coverage="+coverage)
testCoverageEnabled (coverage) //To get coverage reports for instrumentation tests
buildConfigField "String", "SDK_VERSION_STRING",
"\"!SDK-VERSION-STRING!:$publishedGroupId:$artifact:$major.$minor.$patch.0\""
"\"!SDK-VERSION-STRING!:$publishedGroupId:$artifact:$major.$minor.$patch.${build == null ? 0 : build}\""
minifyEnabled false// keep it false we will supply proguard through consumerProguardFiles
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
Expand Down
6 changes: 6 additions & 0 deletions templates/CTCORECHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## CleverTap Android SDK CHANGE LOG

### Version 4.6.7 (March 14, 2023)
* Bug fixes and performance improvements.
* **Note:** This release is being done for Android 12 targeted users, satisfying below points.
* Targeting Android 12 and
* Using RenderMax and/or using Push Templates

### Version 4.6.6 (October 31, 2022)
* Fixes App Inbox bug where an Inbox message's video would not play when new Inbox messages were available

Expand Down
6 changes: 6 additions & 0 deletions templates/CTPUSHTEMPLATESCHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## CleverTap Push Templates SDK CHANGE LOG

### Version 1.0.5.1 (March 14, 2023)
* Supports CleverTap Android SDK v4.6.7. CleverTap Push Templates SDK `v1.0.5.1` requires [CleverTap Android SDK v4.6.7](https://github.com/CleverTap/clevertap-android-sdk/blob/master_android12/docs/CTCORECHANGELOG.md) to work properly.
* **Note:** This release is being done for Android 12 targeted users, satisfying below points.
* Targeting Android 12 and
* Using RenderMax and/or using Push Templates

### Version 1.0.5 (September 13, 2022)
* fixes a bug on android 12 where push template notification header was not displaying subtitle text.

Expand Down
51 changes: 51 additions & 0 deletions templates/CTRENDERMAX.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<p align="center">
<img src="https://github.com/CleverTap/clevertap-ios-sdk/blob/master/docs/images/clevertap-logo.png" height="220"/>
</p>

# RenderMax by CleverTap

RenderMax SDK delivers and renders notifications on the user's device even if the FCM delivery fails or the device is optimized for battery consumption.

# Table of contents

- [Installation](#installation)
- [Developer Notes](#developer-notes)
- [Proguard](#proguard)
- [Changelog](#changelog)

# Installation

[(Back to top)](#table-of-contents)

To use CleverTap's RenderMax SDK with your app, add the following code snippet in the `build.gradle` of the app.

```groovy
dependencies {
implementation "${ext.clevertap_rendermax_sdk}${ext['version.com.clevertap.android..clevertap-rendermax-sdk']}"
}
```

# Developer Notes

[(Back to top)](#table-of-contents)

* The RenderMax SDK is supported for Android SDK `v4.6.6`, React Native SDK `v0.9.3`, Flutter SDK `v1.5.5` and above.
* If the app is custom rendering the push notification and not passing the payload to CleverTap SDK, add the following code before you render the notification:

```
CleverTapAPI.processPushNotification(getApplicationContext(),extras);
```

# Proguard

[(Back to top)](#table-of-contents)

RenderMax SDK is distributed as obfuscated package and for it's smooth working with proguard you must add necessary rules.
The good news is that, Proguard rules for RenderMax SDK is provided out of the box through `consumer-rules.pro` which gets merged with App's Proguard rule so you don't have to do anything here.
Thanks to `consumer-rules.pro`. You can check RenderMax Proguard rules in your `/build/outputs/mapping/configuration.txt` by searching RenderMax keyword.

# Changelog

[(Back to top)](#table-of-contents)

Changelog can be found [here](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTRENDERMAXCHANGELOG.md)
15 changes: 15 additions & 0 deletions templates/CTRENDERMAXCHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## CleverTap RenderMax SDK CHANGE LOG

### Version 1.0.3 (March 6, 2023)
* Fix ANR while receiving push through RenderMax
* Fix crash - java.lang.IllegalStateException

### Version 1.0.2 (January 25, 2023)
* Fix [runtime exception](https://github.com/CleverTap/clevertap-android-sdk/issues/379)

### Version 1.0.1 (December 14, 2022)
* Internal improvements.

### Version 1.0.0 (November 30, 2022)
* Initial release! 🎉
* Supports CleverTap Android SDK `v4.6.6`
6 changes: 6 additions & 0 deletions templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@ CleverTap Huawei Push SDK provides an out of the box service to use the Huawei M
CleverTap Push Templates SDK helps you engage with your users using fancy push notification templates built specifically to work with [CleverTap](https://www.clevertap.com).
Find the integration steps for the CleverTap Push Templates SDK [here](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTPUSHTEMPLATES.md)

## 📲 CleverTap RenderMax SDK
[(Back to top)](#-table-of-contents)

RenderMax SDK delivers and renders notifications on the user's device even if the FCM delivery fails or the device is optimized for battery consumption.
Find the integration steps for the CleverTap RenderMax SDK [here](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTRENDERMAX.md)

## 📄 License
[(Back to top)](#-table-of-contents)
CleverTap Android SDK is MIT licensed, as found in the [LICENSE](https://github.com/CleverTap/clevertap-android-sdk/blob/master/LICENSE) file.
Loading

0 comments on commit 288a130

Please sign in to comment.