File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
firebaseLib/src/main/java/ai/bom/firebase/lib/config Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package ai.bom.firebase.lib.config
2
2
3
3
import ai.bom.firebase.lib.BuildConfig
4
4
import android.content.Context
5
+ import android.util.Log
5
6
import androidx.annotation.Keep
6
7
import com.google.firebase.remoteconfig.FirebaseRemoteConfig
7
8
import com.google.firebase.remoteconfig.FirebaseRemoteConfigSettings
@@ -42,9 +43,14 @@ class RemoteConfigDate(private val remoteTopic: String) {
42
43
fun getRemoteConfig (context : Context , listener : ((Any? ) -> Unit )) {
43
44
getInstance()?.reset()
44
45
getInstance()?.fetchAndActivate()
45
- ?.addOnCompleteListener { _ ->
46
- val value = getRemoteConfig(context)
47
- listener.invoke(value)
46
+ ?.addOnCompleteListener { task ->
47
+ Log .e(" RemoteConfigNew*" , " status : ${task.isSuccessful} " )
48
+ if (task.isSuccessful) {
49
+ val value = getRemoteConfig(context)
50
+ listener.invoke(value)
51
+ } else {
52
+ listener.invoke(getRemoteConfig(context))
53
+ }
48
54
}
49
55
}
50
56
}
You can’t perform that action at this time.
0 commit comments