Search code examples
androidandroid-query

Android: Login with a google account (using Android Query)


I'm using android query on my android mobile app. It is very simple to log in with Facebook:

String appid = "7315348484584";
String permisions = "email";

FacebookHandle handle = new FacebookHandle(this, appid, permisions);

String url = "https://graph.facebook.com/me";
aq.auth(handle).ajax(url, JSONObject.class, this, "bfCallback");

In callback i get user profile info(name, email, gender, etc.)

public void bfCallback(String url, JSONObject json, AjaxStatus status)

How can I do the same thing for a google account?

So! I need to get User's Google Account info: fname, lname, email, gender. How can I do this - not using google play service, etc.


Solution

  • AQuery has a GoogleHandle class which handles authentication to a number of Google services such as Picasa, Spreadsheets, Youtube, Analytics, Blogger, Calendar, Contacts, and Maps as per the Supported Google Services table.

    However, other services, such as Google Account information, is not available via AQuery.