Skip to content

Instantly share code, notes, and snippets.

@dkhmelenko
Created March 11, 2019 21:45
Show Gist options
  • Save dkhmelenko/08ca27253e11a2406a896565876c5526 to your computer and use it in GitHub Desktop.
Save dkhmelenko/08ca27253e11a2406a896565876c5526 to your computer and use it in GitHub Desktop.
val credential = Credential.Builder(login)
.setName(login)
.setPassword(password)
.build()
RxGoogleSmartLockManager.storeCredentials(context, credential)
.subscribe({
Toast.makeText(this, "Credential stored successfully", Toast.LENGTH_SHORT).show()
}, {
Toast.makeText(this, "Failed storing credential: $it", Toast.LENGTH_SHORT).show()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment