Back in January I went on a quest looking for a good way to open gmail URLs on iOS. At first the attempt focused on doing it in the browser but for some reason the url scheme used by desktop GMail is completely different from that used by the mobile versions, and is not consistently portable. That led to the app. Finding its URL scheme was relatively easy thanks to the fact that iOS will let any new application register a url handler for any url scheme. Replace GMail with a url grabber of my own and we’re in business. Unfortunately, there was no scheme to directly access messages, or at least none I could think of worked.
Now though Google, in their constant quest to integrate themselves ever deeper into my iPhone, has released an updated version of GMail which directly opens links in Google Chrome, Maps, and YouTube. Just this in and of itself is not particularly interesting, since each of these has a reasonably simple and for the most part documented URL scheme. The interesting part is that the Google Chrome scheme allows applications to specify callback URLs, and GMail uses this feature. More interesting is that if you open a link in GMail to launch Chrome, go back to GMail without using the callback button in Chrome, select another email, go back to Chrome and use the callback, GMail opens with the email containing the link selected.
GMail has a direct-reference scheme for individual messages, and it has to send it to Chrome in plaintext to make it work. Jackpot!
Using the same trick as before, except this time replacing Google Chrome with a URL Grabber, opening a link in GMail pops out a nice little URL like this.
googlechrome-x-callback://x-callback-url/open/?x-source=Gmail&url=http://tom.scogland.com&x-success=googlegmail:///cv=13eafcee7cc82901/accountId=1&create-new-tab
Ok, maybe not so little after all. Still, documented and relatively simple. What it really boils down to is this.
Chrome-callback:
Source=Gmail
URL to open=http://tom.scogland.com
Callback URL=googlegmail:///cv=13eafcee7cc82901/accountId=1&create-new-tab
Note the new cv=... syntax on the googlegmail url. New and absolutely perfect. It just so happens that the value which goes there is exactly the same as the value in a normal GMail direct message link like this.
https://mail.google.com/mail/u/0/?shva=1#inbox/13eafcee7cc82901
The end result is that it’s not just possible but easy to create links directly to GMail emails that work on iOS. Not only that, but the pertinent information to create the link is the same as for the desktop. No more fumbling around with searches to get the email for my OmniFocus tasks when I’m on the phone! Enjoy, and please share if you find something cool to do with it.
Back in January I went on a quest looking for a good way to open gmail URLs on iOS. At first the attempt focused on...
OpenCL is many things but it is not the easiest programming model to check errors in, as it does not offer a conversion from error...
In iOS, URL schemes are the standard way to open one application from another as well as to pass data to the newly open app....
The problem As we reached the end of the fall, and chill began to set in, my wife found us in possession of a great...
The most recent installment of our annual analysis of the Green500 list is appearing in ISC this year instead of HPPAC. As we collect more...
The final camera ready version of our paper “Heterogeneous Task Scheduling for Accelerated OpenMP” is finally in. This paper was a breaking point for me,...
Our first publication discussing the OpenCL and the 13 Dwarfs benchmark suite, glad to have a tangible artifact from this now. Keep a look out...
I’m rather fond of this work. It’s in direct opposition to the claims made in the original Mars paper that their two pass method was...
The third Green500 paper to HPPAC. I was uninvolved in the second one, working on other projects. Coming back, between Wu, Balaji and I we...
This paper explores the benefits of Hierarchical Charge Partitioning with multiple levels as applied to a CUDA version of the GEM application originally explored on...