firebase libs update

This commit is contained in:
Milos Kozak 2020-10-19 22:42:26 +02:00
parent 955844f319
commit 7ac74f5a9e
9 changed files with 30 additions and 20 deletions

View file

@ -252,9 +252,10 @@ dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs') implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.gms:play-services-wearable:17.0.0' implementation 'com.google.android.gms:play-services-wearable:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.1.0' implementation 'com.google.android.gms:play-services-location:17.1.0'
implementation 'com.google.firebase:firebase-core:17.4.3' implementation platform('com.google.firebase:firebase-bom:25.12.0')
implementation 'com.google.firebase:firebase-auth:19.4.0' implementation "com.google.firebase:firebase-analytics-ktx"
implementation 'com.google.firebase:firebase-database:19.5.0' implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'com.google.firebase:firebase-database-ktx'
implementation "androidx.appcompat:appcompat:$appcompat_verison" implementation "androidx.appcompat:appcompat:$appcompat_verison"
implementation 'androidx.legacy:legacy-support-v13:1.0.0' implementation 'androidx.legacy:legacy-support-v13:1.0.0'
@ -266,7 +267,7 @@ dependencies {
implementation 'androidx.percentlayout:percentlayout:1.0.0' implementation 'androidx.percentlayout:percentlayout:1.0.0'
implementation "androidx.preference:preference-ktx:$preferencektx_version" implementation "androidx.preference:preference-ktx:$preferencektx_version"
implementation "androidx.activity:activity-ktx:${activityVersion}" implementation "androidx.activity:activity-ktx:${activityVersion}"
implementation "androidx.fragment:fragment:${fragmentVersion}" implementation "androidx.fragment:fragment-ktx:${fragmentktx_version}"
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version" implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
implementation "androidx.navigation:navigation-ui-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version"

View file

@ -3,9 +3,7 @@ package info.nightscout.androidaps.plugins.general.tidepool.elements
import com.google.gson.annotations.Expose import com.google.gson.annotations.Expose
import info.nightscout.androidaps.data.Profile import info.nightscout.androidaps.data.Profile
import info.nightscout.androidaps.db.ProfileSwitch import info.nightscout.androidaps.db.ProfileSwitch
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader
import info.nightscout.androidaps.utils.InstanceId
import java.util.* import java.util.*
import kotlin.collections.ArrayList import kotlin.collections.ArrayList

View file

@ -2,10 +2,8 @@ package info.nightscout.androidaps.plugins.general.tidepool.messages
import com.google.gson.annotations.Expose import com.google.gson.annotations.Expose
import info.nightscout.androidaps.BuildConfig import info.nightscout.androidaps.BuildConfig
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin
import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader import info.nightscout.androidaps.plugins.general.tidepool.comm.TidepoolUploader
import info.nightscout.androidaps.utils.DateUtil import info.nightscout.androidaps.utils.DateUtil
import info.nightscout.androidaps.utils.InstanceId
import info.nightscout.androidaps.utils.T import info.nightscout.androidaps.utils.T
import java.util.* import java.util.*

View file

@ -12,15 +12,13 @@ buildscript {
dagger_version = '2.29.1' dagger_version = '2.29.1'
coroutinesVersion = '1.3.7' coroutinesVersion = '1.3.7'
activityVersion = '1.2.0-beta01' activityVersion = '1.2.0-beta01'
fragmentVersion = '1.3.0-beta01' fragmentktx_version = '1.3.0-beta01'
ormLiteVersion = '4.46' ormLiteVersion = '4.46'
nav_version = '2.3.1' nav_version = '2.3.1'
appcompat_verison = '1.2.0' appcompat_verison = '1.2.0'
material_version = '1.2.1' material_version = '1.2.1'
constraintlayout_version = '2.0.2' constraintlayout_version = '2.0.2'
preferencektx_version = '1.1.1' preferencektx_version = '1.1.1'
firebaseanalyticsktx_version = '17.4.3'
firebasecrashlytics_version = '17.2.2'
commonslang3_version = '3.11' commonslang3_version = '3.11'
junit_version = '4.13.1' junit_version = '4.13.1'

View file

@ -59,8 +59,10 @@ dependencies {
//Logger //Logger
implementation 'org.slf4j:slf4j-api:1.7.30' implementation 'org.slf4j:slf4j-api:1.7.30'
//Fabric //Fabric
implementation "com.google.firebase:firebase-analytics-ktx:$firebaseanalyticsktx_version" implementation platform('com.google.firebase:firebase-bom:25.12.0')
implementation "com.google.firebase:firebase-crashlytics:$firebasecrashlytics_version" implementation "com.google.firebase:firebase-analytics-ktx"
implementation "com.google.firebase:firebase-crashlytics-ktx"
implementation "com.google.firebase:firebase-messaging-ktx"
//RxBus //RxBus
implementation "io.reactivex.rxjava2:rxandroid:${rxandroid_version}" implementation "io.reactivex.rxjava2:rxandroid:${rxandroid_version}"

View file

@ -3,7 +3,9 @@ package info.nightscout.androidaps.utils
import android.content.Context import android.content.Context
import android.os.Bundle import android.os.Bundle
import com.google.firebase.analytics.FirebaseAnalytics import com.google.firebase.analytics.FirebaseAnalytics
import com.google.firebase.analytics.ktx.analytics
import com.google.firebase.crashlytics.FirebaseCrashlytics import com.google.firebase.crashlytics.FirebaseCrashlytics
import com.google.firebase.ktx.Firebase
import info.nightscout.androidaps.core.R import info.nightscout.androidaps.core.R
import info.nightscout.androidaps.logging.AAPSLogger import info.nightscout.androidaps.logging.AAPSLogger
import info.nightscout.androidaps.logging.LTag import info.nightscout.androidaps.logging.LTag
@ -18,19 +20,32 @@ import javax.inject.Singleton
*/ */
@Singleton @Singleton
class FabricPrivacy @Inject constructor( class FabricPrivacy @Inject constructor(
context: Context,
private val aapsLogger: AAPSLogger, private val aapsLogger: AAPSLogger,
private val sp: SP private val sp: SP
) { ) {
var firebaseAnalytics: FirebaseAnalytics val firebaseAnalytics: FirebaseAnalytics = Firebase.analytics
init { init {
firebaseAnalytics = FirebaseAnalytics.getInstance(context)
firebaseAnalytics.setAnalyticsCollectionEnabled(!java.lang.Boolean.getBoolean("disableFirebase") && fabricEnabled()) firebaseAnalytics.setAnalyticsCollectionEnabled(!java.lang.Boolean.getBoolean("disableFirebase") && fabricEnabled())
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!java.lang.Boolean.getBoolean("disableFirebase") && fabricEnabled()) FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(!java.lang.Boolean.getBoolean("disableFirebase") && fabricEnabled())
} }
// Analytics logCustom
fun logCustom(name: String, event: Bundle) {
try {
if (fabricEnabled()) {
firebaseAnalytics.logEvent(name, event)
} else {
aapsLogger.debug(LTag.CORE, "Ignoring recently opted-out event: $event")
}
} catch (e: NullPointerException) {
aapsLogger.debug(LTag.CORE, "Ignoring opted-out non-initialized event: $event")
} catch (e: IllegalStateException) {
aapsLogger.debug(LTag.CORE, "Ignoring opted-out non-initialized event: $event")
}
}
// Analytics logCustom // Analytics logCustom
fun logCustom(event: Bundle) { fun logCustom(event: Bundle) {
try { try {

View file

@ -75,12 +75,10 @@ dependencies {
implementation "androidx.core:core-ktx:$coreVersion" implementation "androidx.core:core-ktx:$coreVersion"
implementation "androidx.preference:preference-ktx:$preferencektx_version" implementation "androidx.preference:preference-ktx:$preferencektx_version"
implementation "androidx.activity:activity-ktx:${activityVersion}" implementation "androidx.activity:activity-ktx:${activityVersion}"
implementation "androidx.fragment:fragment:${fragmentVersion}" implementation "androidx.fragment:fragment-ktx:${fragmentktx_version}"
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version" implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
implementation "com.google.android.material:material:$material_version" implementation "com.google.android.material:material:$material_version"
implementation "com.google.firebase:firebase-analytics-ktx:$firebaseanalyticsktx_version"
implementation "io.reactivex.rxjava2:rxandroid:${rxandroid_version}" implementation "io.reactivex.rxjava2:rxandroid:${rxandroid_version}"
// Graphview cannot be upgraded // Graphview cannot be upgraded

View file

@ -933,7 +933,7 @@ public class OmnipodPumpPlugin extends PumpPluginBase implements PumpInterface,
Bundle params = new Bundle(); Bundle params = new Bundle();
params.putString("version", BuildConfig.VERSION); params.putString("version", BuildConfig.VERSION);
fabricPrivacy.getFirebaseAnalytics().logEvent("OmnipodPumpInit", params); fabricPrivacy.logCustom("OmnipodPumpInit", params);
} }
@NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) { @NonNull private PumpEnactResult deliverBolus(final DetailedBolusInfo detailedBolusInfo) {