diff --git a/README.md b/README.md index b29d59ac..3f9c332b 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ Second, you need to add SDK dependencies inside your app .gradle. Then, you need ``` dependencies { ... - implementation 'com.qiscus.sdk:chat-core:1.7.1' + implementation 'com.qiscus.sdk:chat-core:1.8.1' } ``` diff --git a/build.gradle b/build.gradle index fc9edf94..55b92ab8 100644 --- a/build.gradle +++ b/build.gradle @@ -21,8 +21,8 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:8.0.0' - classpath 'com.google.gms:google-services:4.3.15' + classpath 'com.android.tools.build:gradle:8.5.0' + classpath 'com.google.gms:google-services:4.4.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files diff --git a/chat-core/src/main/java/com/qiscus/sdk/chat/core/service/QiscusNetworkCheckerJobService.java b/chat-core/src/main/java/com/qiscus/sdk/chat/core/service/QiscusNetworkCheckerJobService.java index 4d0fdd60..c504b94a 100644 --- a/chat-core/src/main/java/com/qiscus/sdk/chat/core/service/QiscusNetworkCheckerJobService.java +++ b/chat-core/src/main/java/com/qiscus/sdk/chat/core/service/QiscusNetworkCheckerJobService.java @@ -28,8 +28,10 @@ import android.os.Build; import androidx.annotation.RequiresApi; +import com.google.firebase.annotations.concurrent.Background; import com.qiscus.sdk.chat.core.QiscusCore; import com.qiscus.sdk.chat.core.event.QiscusUserEvent; +import com.qiscus.sdk.chat.core.util.QiscusAndroidUtil; import com.qiscus.sdk.chat.core.util.QiscusErrorLogger; import com.qiscus.sdk.chat.core.util.QiscusLogger; @@ -114,9 +116,18 @@ public void onCreate() { @Override public void onDestroy() { - unregisterReceiver(networkStateReceiver); - QiscusLogger.print(TAG, "onDestroy"); - EventBus.getDefault().unregister(this); + QiscusAndroidUtil.runOnBackgroundThread(() -> { + try { + unregisterReceiver(networkStateReceiver); + QiscusLogger.print(TAG, "onDestroy"); + EventBus.getDefault().unregister(this); + }catch (IllegalArgumentException e) { + // already unregistered + } + + }); + + super.onDestroy(); } diff --git a/chat-core/src/main/java/com/qiscus/sdk/chat/core/util/QiscusLogger.java b/chat-core/src/main/java/com/qiscus/sdk/chat/core/util/QiscusLogger.java index 6737653b..dbea750c 100644 --- a/chat-core/src/main/java/com/qiscus/sdk/chat/core/util/QiscusLogger.java +++ b/chat-core/src/main/java/com/qiscus/sdk/chat/core/util/QiscusLogger.java @@ -21,8 +21,10 @@ public static void print(String message) { } public static void print(String tag, String message) { - if (QiscusCore.getChatConfig().isEnableLog()) { - Log.d(tag, message); - } + QiscusAndroidUtil.runOnBackgroundThread(() -> { + if (QiscusCore.getChatConfig().isEnableLog()) { + Log.d(tag, message); + } + }); } } diff --git a/dependencies.gradle b/dependencies.gradle index 6c5891e0..c1230e62 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -30,8 +30,8 @@ repositories { ext { minSDKVersion = 21 - targetSDKVersion = 33 - compileSDKVersion = 33 + targetSDKVersion = 34 + compileSDKVersion = 34 versions = [ support : "31.0.0", diff --git a/docs/index.md b/docs/index.md index d0c2e18f..c2d5b751 100644 --- a/docs/index.md +++ b/docs/index.md @@ -80,7 +80,7 @@ Secondly, you need to add SDK dependencies inside your app .gradle. Then, you ne ``` dependencies { ... - implementation 'com.qiscus.sdk:chat-core:1.7.1' + implementation 'com.qiscus.sdk:chat-core:1.8.1' } ``` diff --git a/gradle.properties b/gradle.properties index 958ca3b9..550c094f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -43,7 +43,7 @@ chatVersionPatch=0 # === qiscus chat-core library version === chatCoreVersionMajor=1 chatCoreVersionMinor=8 -chatCoreVersionPatch=0 +chatCoreVersionPatch=1 # === qiscus default base url BASE_URL_SERVER="https://api.qiscus.com/" @@ -59,7 +59,7 @@ android.useAndroidX=true libraryGroupId=com.qiscus.sdk libraryArtifactId=chat-core -libraryVersion=1.8.0 +libraryVersion=1.8.1 libraryGroupIdChat=com.qiscus.sdk libraryArtifactIdChat=chat diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a2296bfa..e88d26e9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Tue May 02 22:11:28 WIB 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists