From 405c92ca5396f2a40791d05dd90612ed45e4c6e3 Mon Sep 17 00:00:00 2001 From: alexzatsepin Date: Tue, 21 Mar 2017 16:18:42 +0300 Subject: [PATCH] [android] Updated Facebook auidience SDK to 4.20.0 [android] Enabled multidex support --- android/build.gradle | 4 +++- android/src/com/mapswithme/maps/MwmApplication.java | 9 +++++++++ .../maps/widget/placepage/BannerController.java | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 75f8d06e1a..8df9ebf00d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -48,7 +48,7 @@ dependencies { compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.2@aar') { transitive = true } // 3-party compile 'com.facebook.android:facebook-android-sdk:4.8.0' - compile('com.facebook.android:audience-network-sdk:4.8.0') { + compile('com.facebook.android:audience-network-sdk:4.20.0') { exclude group: 'com.google.android.gms' } compile 'com.google.code.gson:gson:2.6.1' @@ -65,6 +65,7 @@ dependencies { compile 'com.github.bumptech.glide:glide:3.7.0' // Java concurrency annotations compile 'net.jcip:jcip-annotations:1.0' + compile 'com.android.support:multidex:1.0.1' } def getDate() { @@ -110,6 +111,7 @@ android { manifestPlaceholders += ['PW_APPID': pwProps['pwAppId']] buildConfigField 'String', 'PW_APPID', /"${pwProps['pwAppId']}"/ manifestPlaceholders += ['PW_PROJECT_ID': pwProps['pwProjectId']] + multiDexEnabled true } sourceSets.main { diff --git a/android/src/com/mapswithme/maps/MwmApplication.java b/android/src/com/mapswithme/maps/MwmApplication.java index 8889741c37..803cb0e518 100644 --- a/android/src/com/mapswithme/maps/MwmApplication.java +++ b/android/src/com/mapswithme/maps/MwmApplication.java @@ -1,6 +1,7 @@ package com.mapswithme.maps; import android.app.Application; +import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Environment; @@ -9,6 +10,7 @@ import android.os.Message; import android.preference.PreferenceManager; import android.support.annotation.NonNull; import android.support.annotation.UiThread; +import android.support.multidex.MultiDex; import android.text.TextUtils; import android.util.Log; @@ -128,6 +130,13 @@ public class MwmApplication extends Application return !BuildConfig.FABRIC_API_KEY.startsWith("0000"); } + @Override + protected void attachBaseContext(Context base) + { + super.attachBaseContext(base); + MultiDex.install(this); + } + @SuppressWarnings("ResultOfMethodCallIgnored") @Override public void onCreate() diff --git a/android/src/com/mapswithme/maps/widget/placepage/BannerController.java b/android/src/com/mapswithme/maps/widget/placepage/BannerController.java index 2965a745b9..036fcf7e29 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/BannerController.java +++ b/android/src/com/mapswithme/maps/widget/placepage/BannerController.java @@ -254,7 +254,7 @@ final class BannerController implements AdListener updateVisibility(); BannerData newData = new BannerData(mNativeAd); - LOGGER.d(TAG, "A new banner was loaded"); + LOGGER.d(TAG, "A new banner was loaded with placement id '" + ad.getPlacementId() + "'"); // In general, if there is a cached banner, we have to show it instead of a just-downloaded banner. // Thus, we try to eliminate a number of situations when user sees a blank banner view until