Skip to content

Instantly share code, notes, and snippets.

@LukyanovAnatoliy
Created April 18, 2019 22:06
Show Gist options
  • Save LukyanovAnatoliy/a49b62900f0fef11fca360534106e33f to your computer and use it in GitHub Desktop.
Save LukyanovAnatoliy/a49b62900f0fef11fca360534106e33f 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")
.add(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