Skip to content

Instantly share code, notes, and snippets.

@imrankst1221
Created May 13, 2019 07:53
Show Gist options
  • Save imrankst1221/f062b89d77b99302a764890b58c45cdc to your computer and use it in GitHub Desktop.
Save imrankst1221/f062b89d77b99302a764890b58c45cdc to your computer and use it in GitHub Desktop.
Write Data On Firestore
private fun writeDataOnFirestore(){
mFirestore.collection("student_info").document("student_list")
.set(studentInfo)
.addOnSuccessListener {
Toast.makeText(mContext, "DocumentSnapshot successfully written!", Toast.LENGTH_LONG).show()
Log.d(TAG, "DocumentSnapshot successfully written!")
initListView()
}.addOnFailureListener {
e -> Log.e(TAG, "Error writing document", e)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment