0

I have a string representation of a ContactsContract.CommonDataKinds.Phone.TYPE in android. I want the integer value of this type.
e.g: lets say "Home" == 1
I had the "1" and then i used:

ContactsContract.CommonDataKinds.Phone.getTypeLabel(...)

to get the String value of it (meaning now i got "Home").

Now in another place of my code I need the integer value again because I want to query the Phone.NUMBER where Phone.TYPE=1

Hope someone understood my question.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Daniel
  • 55
  • 2
  • 11
  • What is your question? – SQLiteNoob Mar 22 '14 at 18:07
  • @SQLiteBoob is there a revert version of `ContactsContract.CommonDataKinds.Phone.getTypeLabel(...)` something like getTypeId() that receives a String as an argument and returns int? – Daniel Mar 22 '14 at 19:00

0 Answers0