0
我正在使用Google标识创建应用程序。ANDROID - 如何从“people api”中找到Google帐户并获得ID
我需要从人的API从“以人/我”
这里我的代码标识朋友的谷歌帐户:
GoogleCredential credential = new GoogleCredential.Builder()
.setTransport(httpTransport)
.setJsonFactory(jsonFactory)
.setClientSecrets(clientId, clientSecret)
.build()
.setFromTokenResponse(tokenResponse);
People peopleService = new People.Builder(httpTransport, jsonFactory, credential)
.build();
ListConnectionsResponse response = peopleService.people().connections()
.list("people/me")
的问题:我不知道如何识别谷歌账户成立。 说明:我想要查找Google帐户,并使用“ID”发送通知,当此应用连接到我的应用时。
你能帮我吗?
您可以执行类似于https://stackoverflow.com/a/44771034/7187774中的答案 –