通过Android上的Gmail访问用户邮件 [英] Access user mails via Gmail on Android

查看:101
本文介绍了通过Android上的Gmail访问用户邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Android应用上使用Gmail发送邮件。
我试图遵循,但我不明白如何获得Gmail API实例。




我还发现了两种连接方式:gmail API和Google Sign-In。



它们之间有什么区别,我应该使用哪一个?
这是通过我的应用程序访问用户邮件的方式吗?

解决方案

它们和我应该使用哪一个?这是通过我的应用程序访问用户邮件的方式吗?

Android的Google登录适用于您的应用的身份验证。它为你提供了强大的功能,所以你不必担心认证实现。不过,如果您打算拨打Gmail API,例如 Users.messages.list ,Google Sign-in还不够。组件如授权和范围被添加到图片中。
因此,对于您的情况,您需要从 Gmail Android快速入门,因为它详细说明了成功拨打电话所需的步骤。


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 ?

解决方案

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.

这篇关于通过Android上的Gmail访问用户邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆