Skip to content

Instantly share code, notes, and snippets.

@oluwabajio
Created November 1, 2021 08:31
Show Gist options
  • Save oluwabajio/5b7c58f4bfec2f0077f735e448c80752 to your computer and use it in GitHub Desktop.
Save oluwabajio/5b7c58f4bfec2f0077f735e448c80752 to your computer and use it in GitHub Desktop.
GlobalScope.launch {
viewModel.saveDataToDatabase(requireActivity(), account)
GlobalScope.launch(Dispatchers.Main) {
Toast.makeText(requireActivity(), "Data Inserted successfully", Toast.LENGTH_LONG).show()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment