Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 794
Aman Mahajan Avatar asked Nov 07 '17 23:11

Aman Mahajan


People also ask

Where is Google Smart Lock settings?

Turn Smart Lock on or off Select Settings . Under "Connected devices," select your Android phone. Turn Smart Lock on or off.


1 Answers

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.

like image 125
David Avatar answered Sep 22 '22 01:09

David