Smart Lock sign-in hint setPhoneNumberIdentifierSupported not working

隐身守侯 提交于 2019-12-23 01:41:39

问题


I am trying to get user phone number with a HintRequest

PendingIntent intent = Auth.CredentialsApi.getHintPickerIntent(
        googleApiClient, new HintRequest.Builder()
                .setPhoneNumberIdentifierSupported(true)
                .setEmailAddressIdentifierSupported(false)
                .build());
        try {
    startIntentSenderForResult(intent.getIntentSender(),
            REQUEST_CODE_RESOLVE_PHONE, null, 0, 0, 0);
} catch (IntentSender.SendIntentException e) {
    e.printStackTrace();
}

But getting no results and Activity.RESULT_CANCELED.

The nubmer is visible in Settings -> About -> Status -> SIM status and can be received through TelephonyManager, but I would like to get it without requesting the phone permission.


回答1:


Turned out it was a sim card problem, didn't work with EE sim



来源:https://stackoverflow.com/questions/45730158/smart-lock-sign-in-hint-setphonenumberidentifiersupported-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!