Search code examples
androidandroid-8.0-oreogoogle-smartlockpasswords

Google Smart Lock dialog is not appearing in Android O devices


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.


Solution

  • Update 1: This issue is resolved in the latest release (Version 11.8.0):

    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.