I recently integrated GoogleSmartLock with my app. Somehow the save dialog is not coming up in Android O devices and the API is throwing following error.
The Credentials API's save confirmation dialog has been disabled to avoid conflicts with the Android Autofill feature. This choice may be overridden via AuthCredentialsOptions.Builder.forceEnableSaveDialog()., resolution=null}
I checked the latest release notes of the playservices and found out that following API can fix this problem.
Auth.AuthCredentialsOptions.Builder forceEnableSaveDialog ()
But I am not sure how to use this api with GoogleApIClient as it does not have build method that technically should return AuthCredentialOptions instance. Please let me know if anyone is facing the same problem.
Turn Smart Lock on or off Select Settings . Under "Connected devices," select your Android phone. Turn Smart Lock on or off.
Update 1: This issue is resolved in the latest release (Version 11.8.0):
AuthCredentialsOptions
has been deprecated, replaced by the new CredentialsOptions
.Credentials.getClient()
now offers overloads that accept CredentialsOptions
.Code examples (as well as further documentation on using .forceEnableSaveDialog
) are available in the "Targeting Android O and above" section of the overview documentation and have been updated to use the new options class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With