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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:20:28+00:00 2026-06-02T19:20:28+00:00

I am developing an android chat app and would like to automatically add/synchronize contacts

  • 0

I am developing an android chat app and would like to automatically add/synchronize contacts like whatsapp does when the user installs the app, and whenever a new contact is added or deleted. I intend using xmpp or a java library for the app. 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-06-02T19:20:31+00:00Added an answer on June 2, 2026 at 7:20 pm

    If your contact sync is to run separately from your chat app, you should use a SyncAdapter. This runs as an Android service, so it can keep the contacts in-sync with a server even when your chat app isn’t running. See the following URL for the SampleSyncAdapter provided by Google, that gives source code and information for building your own SyncAdapter… http://developer.android.com/resources/samples/SampleSyncAdapter/index.html

    If you’re only wanting to sync contacts when your app is running, then you don’t actually need any kind of sync mechanism, you just need to add contacts to your device.

    For both these methods, you add contacts by creating ContactsContract objects, writing them to the Android contacts database. There are a number of variants of ContactsContract depending on the type of data you want to store – for example, ContactsContract.CommonDataKinds.Email is used to store email addresses for a contact. See this URL for information on ContactsContract… http://developer.android.com/reference/android/provider/ContactsContract.html

    I would recommend that you definately read through the source code of the SampleSyncAdapter http://developer.android.com/resources/samples/SampleSyncAdapter/index.html as it provides all the code you need to read and write contacts from the Android contacts database, it shows how to build the ContactsContract for storing contact information, and provides an example of the SyncAdapter if you choose to use it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing android app. It's some sort of social network. Where user can add
I m developing an Android chat application where in user will be provided with
I am developing Android LBS application. I would like to make function calls randomly
I like to start developing android app in Eclipse, but feeling it's not much
I am developing Android Application for Chat between two users as private session .
I am developing android web application for a blog like website. For this I
Iam developing an android app.about google maps API for android i want to ask
i am developing an android todo list app to learn. right now in my
I'm currently developing an Android application that fetches images using http requests. It would
While I'm developing Android-Apps I like to have a look at internal SDK implementations.

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.