Skip to content

Instantly share code, notes, and snippets.

@LukyanovAnatoliy
Created April 18, 2019 22:08
Show Gist options
  • Save LukyanovAnatoliy/fb4648553e3017342618396e6a2d49fa to your computer and use it in GitHub Desktop.
Save LukyanovAnatoliy/fb4648553e3017342618396e6a2d49fa to your computer and use it in GitHub Desktop.
val taskData = HashMap<String, Any>()
taskData["title"] = task.title
taskData["created"] = Timestamp(task.created.time / 1000, 0)
remoteDB.collection("Tasks")
.document("New task")
.set(taskData)
.addOnSuccessListener {
// Successful write
}
.addOnFailureListener {
// There was an error while writing
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment