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 3622944
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:19:20+00:00 2026-05-18T23:19:20+00:00

How can i add two or more addresses using contacts contract? I have three

  • 0

How can i add two or more addresses using contacts contract? I have three postal addresses to add but i don’t see any secondary_address like one for phone/Email. Can anybody assist me with this?
Thanks!!

  • 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-05-18T23:19:20+00:00Added an answer on May 18, 2026 at 11:19 pm

    This worked for me.

    where listSize -> number of contacts

    for (int i = 0; i < listSize; i++) {

                values.clear();
                values.put(Data.MIMETYPE, Phone.CONTENT_ITEM_TYPE);
                values.put(Phone.IS_PRIMARY, true);
                values.put(Phone.TYPE, Phone.TYPE_CUSTOM);
                values.put(Phone.LABEL, "Work "+(i+1));
                values.put(Data.RAW_CONTACT_ID, rawContactId);
                values.put(Phone.NUMBER, allContacts.get(wanted.get(i)).getPhone());
                getContentResolver().insert(Data.CONTENT_URI, values);  
    
                values.clear();
                values.put(Data.MIMETYPE, StructuredPostal.CONTENT_ITEM_TYPE);
                values.put(StructuredPostal.TYPE, Phone.TYPE_CUSTOM);
                values.put(StructuredPostal.LABEL, "Work "+(i+1));
                values.put(Data.RAW_CONTACT_ID, rawContactId);
                values.put(StructuredPostal.STREET, allContacts.get(wanted.get(i)).street);
                values.put(StructuredPostal.CITY, allContacts.get(wanted.get(i)).city);
                values.put(StructuredPostal.REGION, allContacts.get(wanted.get(i)).state);
                values.put(StructuredPostal.POSTCODE, allContacts.get(wanted.get(i)).zipCode);
                getContentResolver().insert(Data.CONTENT_URI, values);
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can i add two header text in Datagrid? My Requirement is to have two
How can I add the same text(s) to two or more different lists? For
How can I add two label in the same grid box? e.g. in row
How can one add two long values in Java so that if the result
I have a scenario where: there are two (or more) tables that represent independent
I have a report with two fields: KWH1 and KWH2. I'd like to add
I have a single WCF service but, until runtime, I don't know the correct
I'm trying to add these two or more inputs in jquery, to give me
The Setup My setup is to have resources shared for two or more sites
Ruby can add methods to the Number class and other core types to get

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.