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 !..
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.
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/
Related
I'm building a webapp that will allow a group of sales persons to provide quick updates on sales oportunitites assigned to them.
Right now, they get an email with a link to go to the WebApp (created with Apps Script) and their input is then saved into a spreadsheet. Is there a way to embed the WebApp directly into the email so I can skip the step where they go to a different site? I'm trying to build this as easy as possible for them.
Thanks!
No, you cannot have a web app, or part of a web app, in an email.
But there are other solutions if they use Gmail:
build a Gmail addon (or Outlook plugin)
create dynamic emails (probably works with other mail providers)
I'm creating a google app using app maker. I want to integrate the Gmail API with the application. I went through it's guideline, but couldn't able to find any useful resource for my use case.
According to the guideline, google app script are supporting this, but I don't' know if it is possible to integrate the that it to the Google App Maker application.
Thanks in advance.
Update
I have done a bit of research and found that there's an inbuilt object called GmailApp which could be access via a server script. There are number of functions related to that. What I particularly looking for is to get/read email thread for the given subject and open it in a separate browser window, so the user will be able to interact with it (read the thread, reply..etc.)
I was able to integrate the Gmail API by going to
APP SETTINGS -> Advanced services and click on ADD SERVICE.
From there we could select Gmail API from the available services. As shown in the screen capture below.
I'm creating a Chrome extension that modifies the gmail UI.
But when I authenticate (with chrome.identity.getAuthToken) in the Chrome extension, it defaults to using the user account that is signed into Chrome.
But I need data for a gmail account when I am on that gmail page.
I saw this answer, but I was wondering if there was any easier way?
I just went through the same process and I couldn't find an easier way.
You'll need to authenticate yourself.
We tried using the mechanism in that link but it requires putting the Client Secret in the Extension - very ugly.
In the end we request and refresh tokens externally through a hosted web page from our www site.
Although a hassle to set up once in place it works nicely and is worth the effort.
I would like to create an extension or app for the Chrome browser which would require access to a user's Google Calender (for creating new appointments).
I am unsure of which technology to better research and use, Chrome extensions or apps. My "app" wouldn't need much of a GUI, so I'm leaning towards extension — but I don't know if this would pose any difficulties for accessing a user's Google Calender to add an event.
Anyone one have any idea which technology is best for this situation, and why? Thanks!
Either, or... Go with an extension if you'd like.
I assume you've looked at the API reference?
https://developers.google.com/google-apps/calendar/
From there, I'd imagine you'd just need OAuth to authenticate the user. Here's the JS library:
https://code.google.com/p/google-api-javascript-client/
There are pros/cons of each types, apps or extensions.
Apps
If you would like to create a client application of Google Calendar which has many rich GUI components, this type will become a better solution.
In addition, Chrome apps can communicate with many hardware devices and other servers. Of course, your Chrome app can become as a server (that is, your app can open a server socket and accept a request from other client apps).
Chrome apps can be executed not depending on your Chrome Web browser. That is, Chrome apps cannot access to a context of your Chrome Web browser.
Probably, you don't want to get the pros above, I guess...
Extensions
If you would like to create a small UI for posting your schedule to Google Calendar, this type will become a better solution.
In addition, Chrome extensions can access to a context of your Chrome Web browser. That is, your extension can get page contents of each tab and inject your CSS and/or JS code. For example, your extension will get a URL of some opened tab and include it in a body of the posted schedule.
Chrome extensions completely depend on your Chrome Web browser. That is, your extension cannot execute independently.
Also, generally, high cost will be needed to develop Chrome apps than Chrome extensions. As the result, you should choose Chrome extensions, I believe.
Is there any way to authenticate the application to use the Google Drive API without a native browser in an embedded system?
I'm looking for a solution to the user accepts and put your password and username using the OAuth2.0 without browser interactions... Is it possible?
My applications is build in Java Code.
Thanks in advance.
I am presently trying to do just this and I don't think it is possible because:
To authenticate in embedded device you need to use this process:
https://developers.google.com/accounts/docs/OAuth2ForDevices
the problem with this, is that it only accept limited range of scopes like:
--https://www.googleapis.com/auth/userinfo.profile
which works OK
but when you try with scope like:
--https://www.googleapis.com/auth/drive.*
you get invalid_scope.
If you find a solution please let me know, I have the same problem my device is embedded, has no screen, and is not available with remote desktop of the like.
thanks for any feed back.
Use the OAuth 2 device flow which is designed for cases where a browser isn't available on the device. It allows the user to complete the login & authorization on a separate, more capable device (phone/tablet/laptop) where a browser is available.