Inferno's answer is the correct answer, and I was happy to find this answer because it looked like what I was looking for. However, if you are dealing with phones installed with API level 5 (Android 2.0) or later, there is one small problem with this: android.R.array.phoneTypes returns only a list of phone types that were present before the class was replaced ContactsContract interface by Level 5 API. I checked the labels listed when creating a new contact on emulators running these versions of Android (API levels): 1.6 (4), 2.1-update 1 (7) and 2.2 (8).
When printed, android.R.array.phoneTypes contains these valid phone types:
Home, Mobile, Work, Work Fax, Home Fax, Pager, Other, Custom
These are valid phone types present for phones with Android 2.0+ installed that are not in the same array:
Callback, Car, Company Main, ISDN, Main, Other Fax, Radio, Telex, TTY TDD, Work Mobile, Work Pager, Assistant, MMS
Unfortunately, I could not find something like android.R.array.phoneTypes , which lists all these valid phone types for Android 2.0+ phones. Has anyone else come across this?
References
android.R.array.phoneTypes : http://developer.android.com/reference/android/R.array.html#phoneTypes
Note. I am posting two other link links in separate answers, since I cannot post more than one hyperlink to the message at this time.
Crystie Lopez
source share