Reputation: 151
The documentation at Android Developers page states that Person.getObjectType() returns an int value as object type, but possible values are "person" and "page". How can I check if object is type of "person" or type of "page"? equals() doesn't allow to compare int with String and I have no idea how can I make that comparison.
Upvotes: 2
Views: 278
Reputation: 93842
May you can check with this :
int type = getObjectType();
if(type == Person.ObjectType.PAGE)
//this is a page
else if(type == Person.ObjectType.PERSON)
//this is a person
Upvotes: 1
Reputation: 24875
I agree that the documentation does not express it well, but if you look for a little more you find that it is refering to constants, defined here (in fact there is a link from the page you posted)
Upvotes: 2