简体   繁体   English

在Android中访问Gmail电子邮件

[英]Accessing Gmail emails in Android

So basically I'm attempting to make an interactive live wallaper that basically displays your unread gmail emails on your wallpaper. 所以基本上我正在尝试制作一个交互式的实时wallaper,它基本上会在你的壁纸上显示未读的Gmail电子邮件。 I'm trying to figure out how to access a person's gmail account on their device (with their permission of course). 我正试图找出如何在他们的设备上访问一个人的Gmail帐户(当然他们的许可)。

I came across this old question: How to get the number of unread gmail mails (on android) - which detailed how to get the number of unread emails and was hoping that would be a start. 我遇到了这个老问题: 如何获取未读的gmail邮件数量(在android上) - 详细说明了如何获取未读电子邮件的数量,并希望这将是一个开始。 But my app was being denied the permission: com.google.android.gm.permission.READ_GMAIL. 但我的应用程序被拒绝了权限:com.google.android.gm.permission.READ_GMAIL。 Upon further research I found this support thread: http://www.google.bg/support/forum/p/gmail/thread?tid=1728955d050a12bd&hl=en - which basically says that at version 2.3.5 of Gmail they shut off that non-public api access to Gmail. 经过进一步的研究,我发现了这个支持主题: http//www.google.bg/support/forum/p/gmail/thread?tid = 1728955d050a12bd& hl = zh-cn。这基本上说明在Gmail 2.3.5版本中他们关闭了非公开API访问Gmail。 Which broke a lot of apps at the time.. But yeah. 这当时打破了很多应用程序..但是是的。

So basically. 所以基本上。 I was wondering if there's a new correct way to do this? 我想知道是否有一种新的正确方法可以做到这一点? I haven't been able to find one. 我找不到一个。 Any help would be greatly appreciated. 任何帮助将不胜感激。 Thanks, 谢谢,

The Java Mail API works really well for interacting with IMAP and POP3 mail servers and I have had success accessing GMAIL accounts with it. Java Mail API非常适合与IMAP和POP3邮件服务器进行交互,并且我已经成功访问​​了GMAIL帐户。 Looking over the API, I don't see anything that would keep it from running on Android. 查看API,我没有看到任何会阻止它在Android上运行的东西。 I recommend that you give it a try: http://www.oracle.com/technetwork/java/javamail/index-138643.html 我建议你试一试: http//www.oracle.com/technetwork/java/javamail/index-138643.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM