I’m writing an Android app that needs to access GMail, and I’d like to do it the same way the SwiftKey does, by showing the user a (Google-hosted?) prompt to login to their Google account, like this:

Do you know what API they’re using to get this prompt? Does this API provide direct access to GMail or do I still have to use IMAP?
Thanks in advance…
It seems like oauth being handled via webview which is constructed to look like dialog box.