Skip to content

Commit

Permalink
Merge pull request #207 from CleverTap/develop
Browse files Browse the repository at this point in the history
Merge develop to master for Android 12 support SDK-1067
  • Loading branch information
piyush-kukadiya authored Nov 2, 2021
2 parents 414db29 + 723d4cc commit 17d6b9f
Show file tree
Hide file tree
Showing 47 changed files with 1,076 additions and 384 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## CHANGE LOG

### November 2, 2021

* [CleverTap Android SDK v4.3.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md)
* [CleverTap Geofence SDK v1.1.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTGEOFENCECHANGELOG.md)
* [CleverTap Xiaomi Push SDK v1.1.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTXIAOMIPUSHCHANGELOG.md)
* [CleverTap Huawei Push SDK v1.1.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTHUAWEIPUSHCHANGELOG.md)


### July 15, 2021

* [CleverTap Android SDK v4.2.0](https://github.com/CleverTap/clevertap-android-sdk/blob/master/docs/CTCORECHANGELOG.md)
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,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.2.0"
implementation "com.clevertap.android:clevertap-android-sdk:4.3.0"
}
```

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.2.0", ext: 'aar')
implementation (name: "clevertap-android-sdk-4.3.0", ext: 'aar')
}
```

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

```groovy
dependencies {
implementation "com.clevertap.android:clevertap-android-sdk:4.2.0"
implementation "com.clevertap.android:clevertap-android-sdk:4.3.0"
implementation "androidx.core:core:1.3.0"
implementation "com.google.firebase:firebase-messaging:20.2.4"
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).
implementation "com.android.installreferrer:installreferrer:2.1" // Mandatory for v3.6.4 and above
implementation "com.android.installreferrer:installreferrer:2.2" // Mandatory for v3.6.4 and above
}
```

Expand Down Expand Up @@ -86,9 +86,9 @@ apply plugin: 'com.google.gms.google-services'
Interstitial InApp Notification templates support Audio and Video with the help of ExoPlayer. To enable Audio/Video in your Interstitial InApp Notifications, add the following dependencies in your `build.gradle` file :

```groovy
implementation "com.google.android.exoplayer:exoplayer:2.11.5"
implementation "com.google.android.exoplayer:exoplayer-hls:2.11.5"
implementation "com.google.android.exoplayer:exoplayer-ui:2.11.5"
implementation "com.google.android.exoplayer:exoplayer:2.15.1"
implementation "com.google.android.exoplayer:exoplayer-hls:2.15.1"
implementation "com.google.android.exoplayer:exoplayer-ui:2.15.1"
```

Once you've updated your module `build.gradle` file, make sure you have specified `mavenCentral()` and `google()` as a repositories in your project `build.gradle` and then sync your project in File -> Sync Project with Gradle Files.
Expand Down
6 changes: 6 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
pluginManagement {
plugins {
id("de.fayard.refreshVersions") version "0.10.0"
//// # available:"0.10.1"
//// # available:"0.11.0"
//// # available:"0.20.0"
//// # available:"0.21.0"
//// # available:"0.22.0"
//// # available:"0.23.0"
}
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ object Libs {
object Android {

// Android SDK
const val compileSdkVersionVal = 30
const val targetSdkVersionVal = 30
const val compileSdkVersionVal = 31
const val targetSdkVersionVal = 31
const val buildToolsVersionVal = "30.0.3"
const val minSdkVersionVal = 16
}
Expand Down
7 changes: 7 additions & 0 deletions clevertap-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ ext {

apply from: "../gradle-scripts/commons.gradle"

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
compileOnly Libs.firebase_messaging
compileOnly Libs.exoplayer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ public Void call() {
inAppController.checkPendingInAppNotifications(activity);
}

public void onActivityCreated(final Bundle notification, final Uri deepLink) {
public void onActivityCreated(final Bundle notification, final Uri deepLink, String accountId) {
try {
boolean shouldProcess = config.isDefaultInstance();
boolean shouldProcess = (accountId == null && config.isDefaultInstance()) || config.getAccountId().equals(accountId);

if (shouldProcess) {
if (notification != null && !notification.isEmpty() && notification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2609,9 +2609,15 @@ static void onActivityCreated(Activity activity, String cleverTapID) {
return;
}

CleverTapAPI instance = CleverTapAPI.instances.get(_accountId);
if (instance != null) {
instance.coreState.getActivityLifeCycleManager().onActivityCreated(notification, deepLink);
try{
for(String accountId : CleverTapAPI.instances.keySet()){
CleverTapAPI instance = CleverTapAPI.instances.get(accountId);
if(instance != null){
instance.coreState.getActivityLifeCycleManager().onActivityCreated(notification, deepLink, _accountId);
}
}
}catch (Throwable t){
Logger.v("Throwable - " + t.getLocalizedMessage());
}
}

Expand Down
Loading

0 comments on commit 17d6b9f

Please sign in to comment.