Google Smart Lock对话框未出现在Android O设备中 [英] Google Smart Lock dialog is not appearing in Android O devices

查看:97
本文介绍了Google Smart Lock对话框未出现在Android O设备中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将GoogleSmartLock与我的应用程序集成在一起.某种程度上,Android O设备中不会出现保存对话框,并且API引发以下错误.

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.

凭据CAPI的保存确认对话框已被禁用以避免与Android自动填充功能发生冲突.这个选择可能是通过覆盖AuthCredentialsOptions.Builder.forceEnableSaveDialog().,resolution = null}

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}

我检查了playservices的最新发行说明,发现以下API可以解决此问题.

I checked the latest release notes of the playservices and found out that following API can fix this problem.

Auth.AuthCredentialsOptions.Builder forceEnableSaveDialog ()

但是我不确定如何将此api与GoogleApIClient一起使用,因为它没有技术上应返回AuthCredentialOptions实例的生成方法.请让我知道是否有人面临同样的问题.

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.

推荐答案

更新1:此问题已在最新版本(版本11.8.0)中解决:

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 .

代码示例(以及有关使用 .forceEnableSaveDialog 的更多文档)可在

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.

这篇关于Google Smart Lock对话框未出现在Android O设备中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆