英文:
How can i get other contacts in android by using google people api
问题
我按照这里的文档进行了操作。他们已经提供了otherContacts()
函数,但在PeopleService
类中找不到该函数。
ListOtherContactsResponse response = peopleService.otherContacts().list()
.setReadMask("metadata,names,emailAddresses")
.execute();
List<Person> otherContacts = response.getOtherContacts();
尝试使用此代码,但未找到ListOtherContactsResponse
类和otherContacts()
函数在PeopleService
中。我正在使用以下依赖项:
compile 'com.google.api-client:google-api-client-android:1.23.0'
compile 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
compile 'com.google.apis:google-api-services-people:v1-rev277-1.23.0'
英文:
I followed through the documention of people api <https://developers.google.com/people/v1/other-contacts>.They already provided the function otherContacts() but it is not available in PeopleService class
ListOtherContactsResponse response = peopleService.otherContacts().list()
.setReadMask("metadata,names,emailAddresses")
.execute();
List<Person> otherContacts = response.getOtherContacts();
tried with this code but didn't find ListOtherContactsResponse class and otherContacts() in PeopleService. I am using these dependencies
compile 'com.google.api-client:google-api-client-android:1.23.0'
compile 'com.google.oauth-client:google-oauth-client-jetty:1.23.0'
compile 'com.google.apis:google-api-services-people:v1-rev277-1.23.0'
答案1
得分: 1
Finally this version solves my problem.
英文:
com.google.apis:google-api-services-people:v1-rev20200720-1.30.10
Finally this version solves my problem
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论