File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
firebaseLib/src/main/java/ai/bom/firebase/lib Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package ai.bom.firebase.lib.analytics
3
3
import android.content.Context
4
4
import android.os.Bundle
5
5
import androidx.annotation.Keep
6
+ import androidx.annotation.Size
6
7
import com.google.firebase.analytics.FirebaseAnalytics
7
8
8
9
@Keep
@@ -11,10 +12,13 @@ class FirebaseAnalytics(context: Context) {
11
12
12
13
/* *
13
14
* 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
15
19
* */
16
20
17
- fun sendEventAnalytics (eventName : String , eventStatus : String ) {
21
+ fun sendEventAnalytics (@Size(min = 1L , max = 40L ) eventName : String , eventStatus : String ) {
18
22
val bundle = Bundle ()
19
23
bundle.putString(FirebaseAnalytics .Param .VALUE , eventStatus)
20
24
firebaseAnalytics.logEvent(eventName, bundle)
Original file line number Diff line number Diff line change @@ -42,13 +42,9 @@ class RemoteConfigDate(private val remoteTopic: String) {
42
42
fun getRemoteConfig (context : Context , listener : ((Any? ) -> Unit )) {
43
43
getInstance()?.reset()
44
44
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)
52
48
}
53
49
}
54
50
}
You can’t perform that action at this time.
0 commit comments