refafo.blogg.se

Google smart lock
Google smart lock









google smart lock

设置GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)

#Google smart lock android#

Let’s begin our implementation of Smart Lock feature in an Android application. If there are no saved credentials you can either let the user fill up the form OR make it easier for them by AutoFill or showing a Hint dialog with available accounts to sign in with.If there are more than one credentials, show them in a dialog and let the user choose.If a single credential exists, auto-sign or auto-fill the login form. You need to structure your login screen code in the following way: What’s the Flow for an application with Smart Lock? You can view all the credentials saved for a Google account by going to. delete(GoogleApiClient client, Credential credential)ĭelete(GoogleApiClient client, Credential credential).disableAutoSignIn(GoogleApiClient client)ĭisableAutoSignIn(GoogleApiClient client).GetHintPickerIntent(GoogleApiClient client, HintRequest request) -显示您具有的登录帐户列表,以便快速填写登录表单。 getHintPickerIntent(GoogleApiClient client, HintRequest request) - Shows a list of signed-in accounts you have in order to quickly fill up login forms.Request(GoogleApiClient client, CredentialRequestrequest) -请求为应用程序保存的所有凭据。 request(GoogleApiClient client, CredentialRequestrequest) - Requests all the credentials saved for the app.Save(GoogleApiClient client, Credential credential) save(GoogleApiClient client, Credential credential).Now with Google Smart Lock everything is taken care of by the Google Servers.įollowing are the major methods present in the Credentials API:











Google smart lock