gpt4 book ai didi

android - Google 的短信一次性代码自动填充服务,API_NOT_AVAILABLE 状态是什么意思?

转载 作者:行者123 更新时间:2023-12-05 07:10:30 29 4
gpt4 key购买 nike

我正在尝试实现 SMS 一次性代码自动填充服务。

        SmsCodeAutofillClient smsCodeAutofillClient = SmsCodeRetriever.getAutofillClient(this);
Task<Void> voidTask = smsCodeAutofillClient.startSmsCodeRetriever();

每次,此任务都会失败并出现以下异常:“com.google.android.gms.common.api.ApiException: 36501”,状态消息为 API_NOT_AVAILABLE。谷歌doc关于此状态的说明如下:

The calling application is not eligible to use this particular API.

Note: For SmsCodeAutofillClient, this status indicates that the calling application is not the current user-designated autofill service.

我的问题是这个异常实际上意味着什么? “调用应用程序不是当前用户指定的自动填充服务”是什么意思?

最佳答案

这意味着您的应用必须是 Autofill service app,另外需要选择为设备默认的自动填充服务app,见here供引用。

以上是使用该API的前提条件。

关于android - Google 的短信一次性代码自动填充服务,API_NOT_AVAILABLE 状态是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61200925/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com