Question

Here My question is that i want to create one html5 based cross platform mobile application.

In which i want to read my gmail mail data and want to display it in my application page. Here i don't want to send any mail using this app i just want to display the mail of my gmail account.I searched about it on google but i did not get any result for it.

if we make something like it then give me some information about it how to read data from gmail mail.If we can't do then please give me some reason for it or helpful links.

So if anyone have any idea about it then please help me.

Thanks in advance !..

Was it helpful?

Solution

Pure HTML 5 Alone

No. As the other answers point out, Gmail does not provide a RESTfull API that would be accessible to a HTML mobile app. However, Gmail does provide the standard IMAP and SMTP APIs. You can read all about integrating GMail features within apps here: https://developers.google.com/gmail/.

Pure HTML 5 With Middleware

Using pure mobile HTML5 cross platform code - you will not be able to make use of these APIs. However, you could write a server to act as a middleware between GMail and your pure HTML 5 application. The server could do all the interaction needed with Gmail, and your application could interface with the server. I'm not recommending this because you could be opening up your user's Gmail to many security flaws, and it would be a lot of extra work on top of the HTML5 app - but it is possible.

Mobile Chrome App

Although this is not pure HTML5 - Chrome Apps allow TCP socket connections. Having direct TCP connections would allow you to write - or find an existing - IMAP client to read email. Next, you could use Mobile Chrome Apps to put your chrome app on IOS and Android. This is not pure HTML5 and is not 100% cross platform (windows phone, etc), but you app would be able to directly talk to Gmail.

Platform Specific Apps

Of course the final option is to write platform-specific apps that can directly interface with IMAP & SMTP. This option does go directly against your requirements in the question, but I felt like it should be included to be a comprehensive answer.

OTHER TIPS

Sorry, but you cannot create such Html5 based cross platform mobile app (which seems like an email client, though used for reading purpose only). Google hasn't provided any Rest API through which we can access our gmail accounts. Link provided by @tnt, itself says in its last line:

Please keep in mind that Gmail messages will appear in your aggregator only if there are unread messages in your inbox.

You can even check the list of APIs provided by google: APIs Explorer

You can add a middleware (server) like:

Your application <--> Your server <--> Gmail

For this, you should have a server. Create RESTful web services (using, WCF, for example) that will do your job of bring mails to you. Publish it. And, you can, then, use those service urls in your html pages. This the way you can achieve, what you want (making cross platform mail clients, I guess)..

My suggestion is to go with phonegap.I used it in which u can create apps in HTML5.Also since for gmail use gmail apis in html5.
The following link is for phonegap http://phonegap.com/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top