Helper functions for using cordova / phonegap with google gapi