开发者

Making a request to Google Contacts API from Android

开发者 https://www.devze.com 2023-03-19 06:35 出处:网络
I am new to programming with the Google Data APIs and I don\'t understand the necessary steps to retrieve information in Android. I have figured out how to use the AccountManager to get an access toke

I am new to programming with the Google Data APIs and I don't understand the necessary steps to retrieve information in Android. I have figured out how to use the AccountManager to get an access token for the user, but now I am lost on how to use that token to sign requests. I've read countless confusing JavaDocs on HttpTransport and HttpRequestFactory and that's where I'm getting confused. I think I need an HttpTransport (recommended to be ApacheHttpTransport) and I can use an HttpRequestFactory to build requests and I use a JSONFactory to read the results开发者_运维技巧, but how do I link all those together? And how do I send a request?

Thanks so much for any help you can give.


If you are using OAuth2, the request for contacts from the API must have the auth_token bound to it in the HTTP header (Post header I think)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号