Created
December 25, 2018 21:09
-
-
Save hiranya911/8f834dbd794cc56d706520f1dc74a86c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private suspend fun savePref(currency: String, min: Double, max: Double) { | |
val instanceId = FirebaseInstanceId.getInstance().instanceId.await() | |
val data = mapOf( | |
"${currency}_min" to min, | |
"${currency}_max" to max, | |
"token" to instanceId.token | |
) | |
db.collection("prefs").document(instanceId.id) | |
.set(data, SetOptions.merge()).await() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment