diff --git a/app/build.gradle b/app/build.gradle index afde67b2..2e4ee8ac 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -110,7 +110,7 @@ dependencies { implementation "com.bazaarvoice.bvandroidsdk:conversations-ui:$demoAppSharedVersions.bvSdkVersion" } //BVSDK Dependencies - implementation 'com.google.android.gms:play-services-ads:15.0.0' + implementation sdkDep.playServiceAdsIdentifier implementation 'com.google.android.gms:play-services-maps:16.0.0' implementation 'com.google.code.gson:gson:2.8.5' implementation 'com.squareup.okhttp3:okhttp:3.12.0' diff --git a/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/utils/DemoUtils.java b/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/utils/DemoUtils.java index baa16955..3e8f8411 100644 --- a/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/utils/DemoUtils.java +++ b/app/src/main/java/com/bazaarvoice/bvsdkdemoandroid/utils/DemoUtils.java @@ -7,8 +7,6 @@ import android.graphics.Point; import android.view.Display; -import com.google.android.gms.ads.AdRequest; - import org.json.JSONException; import org.json.JSONObject; @@ -17,22 +15,6 @@ public class DemoUtils { public static final int MAX_IMAGE_WIDTH = 1440; public static final int MAX_IMAGE_HEIGHT = 2560; -// private Picasso picasso; -// private Context context; -// -// public DemoUtils(Context context) { -// this.context = context; -// } - -// public Picasso picassoThumbnailLoader() { -// if (picasso == null) { -// picasso = new Picasso.Builder(context) -// .defaultBitmapConfig(Bitmap.Config.RGB_565) -// .build(); -// } -// return picasso; -// } - public static ReturnType safeParse(String key, JSONObject jsonObject) { return safeParse(key, jsonObject, null); } @@ -59,21 +41,6 @@ public static String safeParseString(String key, JSONObject jsonObject, String d return value != null ? value : defaultValue; } - public static String getDfpAdErrorMessage(int errorCode) { - switch (errorCode) { - case AdRequest.ERROR_CODE_INTERNAL_ERROR: - return "Something happened internally; for instance, an invalid response was received from the ad server."; - case AdRequest.ERROR_CODE_NETWORK_ERROR: - return "The ad request was unsuccessful due to network connectivity."; - case AdRequest.ERROR_CODE_INVALID_REQUEST: - return "The ad request was invalid; for instance, the ad unit ID was incorrect."; - case AdRequest.ERROR_CODE_NO_FILL: - return "The ad request was successful, but no ad was returned due to lack of ad inventory."; - default: - return "unknown error code"; - } - } - public static Point getScreenDimensions(Activity activity) { Display display = activity.getWindowManager().getDefaultDisplay(); Point size = new Point(); diff --git a/app/src/main/res/layout/row_ad.xml b/app/src/main/res/layout/row_ad.xml deleted file mode 100644 index 36b1e2da..00000000 --- a/app/src/main/res/layout/row_ad.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bvanalytics/build.gradle b/bvanalytics/build.gradle index fd652909..8d860b31 100644 --- a/bvanalytics/build.gradle +++ b/bvanalytics/build.gradle @@ -10,11 +10,11 @@ android { dependencies { implementation sdkDep.supportAnnotations - implementation sdkDep.playServiceAds + implementation sdkDep.playServiceAdsIdentifier implementation sdkDep.okhttp3 // Dependencies for local unit tests - testImplementation sdkDep.playServiceAds + testImplementation sdkDep.playServiceAdsIdentifier testImplementation sdkDep.gson testImplementation sdkTestDep.junit testImplementation sdkTestDep.mockito diff --git a/bvauthiovation/build.gradle b/bvauthiovation/build.gradle index 81b0ea93..2c5835a8 100644 --- a/bvauthiovation/build.gradle +++ b/bvauthiovation/build.gradle @@ -22,7 +22,7 @@ dependencies { testCompileOnly project(':bvcommon') testCompileOnly project(':bvanalytics') testCompileOnly sdkDep.gson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier } apply from: rootProject.file('gradle/setup-signing.gradle') diff --git a/bvcommon/build.gradle b/bvcommon/build.gradle index 947acdac..5c7b14c1 100644 --- a/bvcommon/build.gradle +++ b/bvcommon/build.gradle @@ -4,7 +4,7 @@ dependencies { implementation project(':bvanalytics') implementation sdkDep.okhttp3 implementation sdkDep.recyclerview - implementation sdkDep.playServiceAds + implementation sdkDep.playServiceAdsIdentifier implementation sdkDep.gson // Dependencies for local unit tests diff --git a/bvconversations/build.gradle b/bvconversations/build.gradle index 9c4f937c..3e6277ef 100644 --- a/bvconversations/build.gradle +++ b/bvconversations/build.gradle @@ -15,7 +15,7 @@ dependencies { testImplementation sdkTestDep.robolectric testImplementation project(':bvanalytics') testImplementation sdkTestDep.androidJson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier testCompileOnly sdkDep.gson } diff --git a/bvconversationsui/build.gradle b/bvconversationsui/build.gradle index 8247cf60..5d0ccc4d 100644 --- a/bvconversationsui/build.gradle +++ b/bvconversationsui/build.gradle @@ -16,7 +16,7 @@ dependencies { testImplementation sdkTestDep.robolectric testImplementation project(':bvanalytics') testCompileOnly sdkTestDep.androidJson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier testCompileOnly sdkDep.gson } diff --git a/bvcurations/build.gradle b/bvcurations/build.gradle index c6b3e73b..7530c2dc 100644 --- a/bvcurations/build.gradle +++ b/bvcurations/build.gradle @@ -14,7 +14,7 @@ dependencies { testImplementation sdkTestDep.robolectric testCompileOnly project(':bvcommon') testCompileOnly project(':bvanalytics') - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier testCompileOnly sdkTestDep.androidJson testCompileOnly sdkDep.gson } diff --git a/bvcurationsui/build.gradle b/bvcurationsui/build.gradle index ab4e0e73..50fe7c55 100644 --- a/bvcurationsui/build.gradle +++ b/bvcurationsui/build.gradle @@ -16,7 +16,7 @@ dependencies { testCompileOnly sdkTestDep.robolectric testCompileOnly project(':bvanalytics') testCompileOnly sdkDep.gson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier } apply from: rootProject.file('gradle/setup-signing.gradle') diff --git a/bvlocation/build.gradle b/bvlocation/build.gradle index 4f4ddace..5538bb7a 100644 --- a/bvlocation/build.gradle +++ b/bvlocation/build.gradle @@ -16,7 +16,7 @@ dependencies { testCompileOnly sdkTestDep.robolectric testCompileOnly project(':bvanalytics') testCompileOnly sdkDep.gson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier } apply from: rootProject.file('gradle/setup-signing.gradle') diff --git a/bvnotifications/build.gradle b/bvnotifications/build.gradle index 91ee4d4e..5e871b1d 100644 --- a/bvnotifications/build.gradle +++ b/bvnotifications/build.gradle @@ -15,7 +15,7 @@ dependencies { testImplementation sdkTestDep.robolectric testCompileOnly project(':bvanalytics') testCompileOnly sdkDep.gson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier } apply from: rootProject.file('gradle/setup-signing.gradle') diff --git a/bvrecommendations/build.gradle b/bvrecommendations/build.gradle index 682c20db..fa561fe7 100644 --- a/bvrecommendations/build.gradle +++ b/bvrecommendations/build.gradle @@ -6,7 +6,7 @@ dependencies { compileOnly sdkDep.recyclerview compileOnly sdkDep.gson compileOnly sdkDep.okhttp3 - compileOnly sdkDep.playServiceAds + compileOnly sdkDep.playServiceAdsIdentifier // Dependencies for local unit tests testImplementation sdkTestDep.junit @@ -15,7 +15,7 @@ dependencies { testImplementation sdkTestDep.robolectric testCompileOnly project(':bvanalytics') testCompileOnly sdkDep.gson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier } apply from: rootProject.file('gradle/setup-signing.gradle') diff --git a/bvstorenotifications/build.gradle b/bvstorenotifications/build.gradle index 43b010a0..e72f486a 100644 --- a/bvstorenotifications/build.gradle +++ b/bvstorenotifications/build.gradle @@ -19,7 +19,7 @@ dependencies { testCompileOnly project(':bvanalytics') testCompileOnly project(':bvcommon') testCompileOnly sdkDep.gson - testCompileOnly sdkDep.playServiceAds + testCompileOnly sdkDep.playServiceAdsIdentifier } apply from: rootProject.file('gradle/setup-signing.gradle') diff --git a/dependencies.gradle b/dependencies.gradle index 99f07932..d849c321 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -18,7 +18,7 @@ ext { okhttp3Version : '3.10.0', supportLibraryVersion : '28.0.0', gimbalVersion : '2.72', - playServicesVersion : '15.0.0', + playServicesAdsIdentifier : '17.1.0', robolectric: '4.3', robolectricAddOn : '4.3', androidx: '1.0.0' @@ -36,10 +36,10 @@ ext { supportAnnotations : "androidx.annotation:annotation:$sdkSharedVersions.androidx", // common - okhttp3 : "com.squareup.okhttp3:okhttp:$sdkSharedVersions.okhttp3Version", - gson : 'com.google.code.gson:gson:2.8.5', - playServiceAds : "com.google.android.gms:play-services-ads:$sdkSharedVersions.playServicesVersion", - recyclerview : "androidx.recyclerview:recyclerview:$sdkSharedVersions.androidx", + okhttp3 : "com.squareup.okhttp3:okhttp:$sdkSharedVersions.okhttp3Version", + gson : 'com.google.code.gson:gson:2.8.5', + playServiceAdsIdentifier : "com.google.android.gms:play-services-ads-identifier:$sdkSharedVersions.playServicesAdsIdentifier", + recyclerview : "androidx.recyclerview:recyclerview:$sdkSharedVersions.androidx", // location gimbal : "com.gimbal.android.v2:gimbal-sdk:$sdkSharedVersions.gimbalVersion",