-
Notifications
You must be signed in to change notification settings - Fork 0
CDO 5.8 Integrated guide
In CDO 5.8+, CDO add some logics for GDPR and add some custom theme for calling hint ui, that means some new lib have been added into CDO aar, it causes lib conflict issues.
Base on the doc of CDO: CDO 集成文档
Tips:
-
The Caller SDK 5.8+ no longer needs permission to draw over other apps (overlay). However, the entry is still in our manifest. If you do not wish to have it requested, add the following entry in your Manifest:
-
Stable Activity entries By stable Activity we mean an Activity, which not only exist for a short moment like a Splash Activity. Caller SDK initialization requires server communication and hence some time to run. We need the context fed to the initialization method to not get destroyed while the initialization is taking place, or the initialization may fail until initialization is called again. Add the method to initialize The Caller SDK in typically the onCreate() method as follows: Calldorado.startCalldorado(this); Above method is available in different versions, which may provide feedback on when initialization is done or how the user responded to Optin and permissions using a callback. Optimally code to customize Aftercall colors and provide a better user experience if navigating from Aftercall to host app should be added to this Activity as well.
-
Do not use target version as 28.
-
Delay to initial CDO sdk to avoid ANR about CDO.
We add the CDO into a prject, following is the change log about this patch.
diff --git a/CallFree/app/build.gradle b/CallFree/app/build.gradle
index 6d0512e..93ccc46 100644
--- a/CallFree/app/build.gradle
+++ b/CallFree/app/build.gradle
@@ -267,8 +267,8 @@ dependencies {
compile (name: 'aerserv-support-release-1.0.1', ext: 'aar')
// add for vungle
- compile 'com.google.android.gms:play-services-basement:15.0.1'
- compile 'com.google.android.gms:play-services-location:15.0.1'
+// compile 'com.google.android.gms:play-services-basement:15.0.1'
+// compile 'com.google.android.gms:play-services-location:15.0.1'
// end for vungle
// add for Unity
@@ -313,7 +313,7 @@ calldorado {
// Updating? See https://my.calldorado.com/Upgrading_the_Calldorado_SDK.pdf
dependencies {
- compile('com.calldorado:calldorado-release:3.8.7.953-SNAPSHOT@aar') {
+ compile('com.calldorado:calldorado-release:5.0.29.1615-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.googlecode.libphonenumber'
@@ -322,6 +322,15 @@ dependencies {
exclude group: 'com.facebook.android', module: 'audience-network-sdk'
exclude group: 'com.google.code.gson', module: 'gson'
exclude group: 'com.flurry.android'
+ // exclude for 5.0+
+ exclude group: 'com.android.support', module: 'cardview-v7'
+ exclude group: 'com.android.support', module: 'appcompat-v7'
+ exclude group: 'com.android.support', module: 'design'
+
+ exclude group: 'com.google.firebase', module: 'firebase-ads'
+ exclude group: 'com.google.android.gms', module: 'play-services-ads'
+// exclude group: 'com.google.android.gms', module: 'play-services-basement'
+// exclude group: 'com.google.android.gms', module: 'play-services-location'
}
}
// -------------------------------------------------------------------------------------------------
diff --git a/CallFree/app/proguard-rules.pro b/CallFree/app/proguard-rules.pro
index f240f8c..8422188 100644
--- a/CallFree/app/proguard-rules.pro
+++ b/CallFree/app/proguard-rules.pro
@@ -19,6 +19,10 @@
# public *;
#}
+
+-dontoptimize
+-dontpreverify
+
-dontwarn com.google.ads.*.*
-ignorewarnings
@@ -376,6 +380,12 @@ public static final ** CREATOR;
# For Admob
-keep class com.google.android.gms.ads.** { *; }
+-keep public class com.google.android.gms.* { public *; }
+
+-keep class com.facebook.ads.** { *; }
+
+
+
# For Applovin
-dontwarn com.applovin.**
-keep class com.applovin.** { *; }
@@ -427,3 +437,8 @@ public static final ** CREATOR;
-keepattributes Signature
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.examples.android.model.** { *; }
+
+##-------------CDO begin----------------
+-keep class c.** { *; }
+-dontwarn c.**
+##-------------CDO end----------------
\ No newline at end of file
diff --git a/CallFree/app/src/main/AndroidManifest.xml b/CallFree/app/src/main/AndroidManifest.xml
index 969a3cc..4cd3484 100644
--- a/CallFree/app/src/main/AndroidManifest.xml
+++ b/CallFree/app/src/main/AndroidManifest.xml
@@ -182,6 +182,9 @@
<meta-data android:name="com.calldorado.AppId"
android:value="@string/calldorado_appId" />
+ <meta-data
+ android:name="com.calldorado.EEAMode" android:value="disable" />
+
<meta-data android:name="appmonet.application.id"
android:value="@string/appmonet_appId" />
--
2.5.3