Access user mails via Gmail on Android

雨燕双飞 提交于 2019-12-11 06:59:42

问题


I am trying to access sent mails with gmail on an android app. I tried to follow this but I don't understand how to get the Gmail API instance.

I also found two ways to connect: the gmail API one and Google Sign-In.

What's the difference between them and which one should I use ? Is this the way to access user's mails with my app ?


回答1:


What's the difference between them and which one should I use ? Is this the way to access user's mails with my app ?

Google Sign-in for Android is good for authentication purposes for your app. It does the heavy-lifting for you so you don't have to worry about authentication implementations.

However, if you intend to make calls to Gmail APIs like the Users.messages.list you've mentioned, Google Sign-in will not be enough. Components like authorization and scopes are added to the picture. So in your case, you need to start with the Gmail Android Quickstart as it details the steps you need to make successful calls.



来源:https://stackoverflow.com/questions/43395140/access-user-mails-via-gmail-on-android

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