Skip to content

Commit 4f4b3b2

Browse files
author
Ahmad Idrees
committed
fix remote result bug
1 parent 0c12f2b commit 4f4b3b2

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

firebaseLib/src/main/java/ai/bom/firebase/lib/analytics/FirebaseAnalytics.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package ai.bom.firebase.lib.analytics
33
import android.content.Context
44
import android.os.Bundle
55
import androidx.annotation.Keep
6+
import androidx.annotation.Size
67
import com.google.firebase.analytics.FirebaseAnalytics
78

89
@Keep
@@ -11,10 +12,13 @@ class FirebaseAnalytics(context: Context) {
1112

1213
/**
1314
* Command to Enable Analytics in Debug Mode
14-
* Command : adb shell setprop debug.firebase.analytics.app packageName
15+
* Command 1: adb shell setprop debug.firebase.analytics.app packageName
16+
* Command 2: adb shell setprop log.tag.FA VERBOSE
17+
* Command 3: adb shell setprop log.tag.FA-SVC VERBOSE
18+
* Command 4: adb logcat -v time -s FA FA-SVC
1519
* */
1620

17-
fun sendEventAnalytics(eventName: String, eventStatus: String) {
21+
fun sendEventAnalytics(@Size(min = 1L, max = 40L) eventName: String, eventStatus: String) {
1822
val bundle = Bundle()
1923
bundle.putString(FirebaseAnalytics.Param.VALUE, eventStatus)
2024
firebaseAnalytics.logEvent(eventName, bundle)

firebaseLib/src/main/java/ai/bom/firebase/lib/config/RemoteConfigData.kt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,9 @@ class RemoteConfigDate(private val remoteTopic: String) {
4242
fun getRemoteConfig(context: Context, listener: ((Any?) -> Unit)) {
4343
getInstance()?.reset()
4444
getInstance()?.fetchAndActivate()
45-
?.addOnCompleteListener { task ->
46-
if (task.isSuccessful) {
47-
val value = getRemoteConfig(context)
48-
listener.invoke(value)
49-
} else {
50-
listener.invoke(null)
51-
}
45+
?.addOnCompleteListener { _ ->
46+
val value = getRemoteConfig(context)
47+
listener.invoke(value)
5248
}
5349
}
5450
}

0 commit comments

Comments
 (0)