Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7807701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:56:01+00:00 2026-06-02T02:56:01+00:00

Using the contacts api how do i get all allowed types for phone, email,

  • 0

Using the contacts api how do i get all allowed types for phone, email, postal address, etc. to fill a dropdown similar to the one in the contacts application?? For example in the drop down for Phone I would like to see these – TYPE_HOME, TYPE_MOBILE, TYPE_WORK, TYPE_FAX_WORK, TYPE_FAX_HOME, TYPE_PAGER, TYPE_OTHER, TYPE_CALLBACK, TYPE_CAR, TYPE_COMPANY_MAIN, TYPE_ISDN, TYPE_MAIN, TYPE_OTHER_FAX, TYPE_RADIO, TYPE_TELEX, TYPE_TTY_TDD, TYPE_WORK_MOBILE, TYPE_WORK_PAGER, TYPE_ASSISTANT, TYPE_MMS properly translated into the respective labels. similarly for email, etc. Hope the question is clear now. Thanks in advance for any help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:56:04+00:00Added an answer on June 2, 2026 at 2:56 am

    Since I did not get any responses, I have ended up doing this… Sample code shown for getting phone types. I was hoping that that there might be a more elegant way to do this where a future addition of a type is taken care of automatically rather than having to edit the source

    public void createPhoneTypes() {
    
        phoneTypes = new ArrayList<Integer>();
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_ASSISTANT);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_CALLBACK);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_CAR);
        phoneTypes
                .add(ContactsContract.CommonDataKinds.Phone.TYPE_COMPANY_MAIN);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_FAX_HOME);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_FAX_WORK);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_HOME);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_ISDN);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_MAIN);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_MMS);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_OTHER);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_OTHER_FAX);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_PAGER);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_RADIO);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_TELEX);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_TTY_TDD);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_WORK);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_WORK_MOBILE);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_WORK_PAGER);
        phoneTypes.add(ContactsContract.CommonDataKinds.Phone.TYPE_CUSTOM);
    
    }
    
    
    
    public String[] getAllPhoneTypeLabels() {
        String[] stypes = new String[phoneTypes.size()];
        for (int i=0; i<phoneTypes.size(); i++) {
            stypes[i] = ContactsContract.CommonDataKinds.Phone.getTypeLabel(context.getResources(), phoneTypes.get(i), "").toString();
        }
        return stypes;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Google Contacts API to get back formatted JSON, hopefully containing ALL
To get all contacts I'm using ABAddressBookCopyArrayOfAllPeople method but, this method return all contacts
I am using OAuth to access Google's API (IMAP, contacts, etc), assuming I have
With the Google Contacts API, you can GET contact information using JSON, but is
I am using ContactsContract API in Android to get the list of contacts. The
I am trying to get gmail contacts using Google contacts api . For this
I'm using the old Contacts API to choose a contact with a phone number.
So, I am using Google Contacts API to let users import their contacts from
I'm considering using the Google Contacts API for a webapp, but I'm worried that
I'm using a database that contains contacts (fields like name, address, ...). If i'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.