Get image profile of gmail or Google+ in android -


I want to get the profile image of the owner or terminal of Google + Gmail, where the app is running, working with markers Googlemaps .

I have noticed that class person (deprecated) and GoogleApiClient latter is not working, always gives me nullpointerexeption ().

Be sure that you are making your GoogleApiClient properly, for the Google Plus login and profile information Scope is required You must also add Plus API. Note that the following example class assumes that this code also applies to appropriate connection listeners.

  // Remove any GoogleApiClient = new GoogleApiClient.Builder (this) .addConnectionCallbacks (this) .addOnConnectionFAiredListener (this) .addScope (plus. SCOPE_PLUS_LOGIN) .addScope (plus. SCOPE_PLUS_PROFILE) .addApi (Plus.API) .build (); // Other code .... @Override Public void onconnected {// profile image get here}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -