public final class Profile
extends java.lang.Object
implements android.os.Parcelable
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<Profile> |
CREATOR |
Constructor and Description |
---|
Profile(java.lang.String id,
java.lang.String firstName,
java.lang.String middleName,
java.lang.String lastName,
java.lang.String name,
android.net.Uri linkUri)
Contructor.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object other) |
static void |
fetchProfileForCurrentAccessToken()
Fetches and sets the current profile from the current access token.
|
static Profile |
getCurrentProfile()
Getter for the profile that is currently logged in to the application.
|
java.lang.String |
getFirstName()
Getter for the first name of the profile.
|
java.lang.String |
getId()
Getter for the id of the profile.
|
java.lang.String |
getLastName()
Getter for the last name of the profile.
|
android.net.Uri |
getLinkUri()
Getter for the link of the profile.
|
java.lang.String |
getMiddleName()
Getter for the middle name of the profile.
|
java.lang.String |
getName()
Getter for the name of the profile.
|
android.net.Uri |
getProfilePictureUri(int width,
int height)
Getter for the Uri of the profile picture.
|
int |
hashCode() |
static void |
setCurrentProfile(Profile profile)
Setter for the profile that is currently logged in to the application.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
public static final android.os.Parcelable.Creator<Profile> CREATOR
public Profile(java.lang.String id, @Nullable java.lang.String firstName, @Nullable java.lang.String middleName, @Nullable java.lang.String lastName, @Nullable java.lang.String name, @Nullable android.net.Uri linkUri)
id
- The id of the profile.firstName
- The first name of the profile. Can be null.middleName
- The middle name of the profile. Can be null.lastName
- The last name of the profile. Can be null.name
- The name of the profile. Can be null.linkUri
- The link for this profile. Can be null.public static Profile getCurrentProfile()
public static void setCurrentProfile(@Nullable Profile profile)
com.facebook.login.LoginManager
.profile
- The profile that is currently logged in to the application.public static void fetchProfileForCurrentAccessToken()
public android.net.Uri getProfilePictureUri(int width, int height)
width
- The desired width for the profile picture.height
- The desired height for the profile picture.public java.lang.String getId()
public java.lang.String getFirstName()
public java.lang.String getMiddleName()
public java.lang.String getLastName()
public java.lang.String getName()
public android.net.Uri getLinkUri()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int describeContents()
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable