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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:47:34+00:00 2026-05-13T19:47:34+00:00

Mi problem is that I need to implement Contact List in my application for

  • 0

Mi problem is that I need to implement Contact List in my application for both android 1.5, 1.6 and 2.x.

I did it using the old Contacts API, not ContactsContract because of backwards compatibility with 1.x series. But when displaying my app on 2.x the contact list is not complete. In some devices it’s shown as empty, and in some devices it only displays some of the contacts in the device.

I know that using Contacts API on 2.x series it will show only main account contacts, but this is not the case. It looks like only recently updated contacts are shown but that’s not the case either.

So the question is: How to correctly implement contact list for both 2.x and 1.x android version?

Thanks in advance

  • 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-13T19:47:34+00:00Added an answer on May 13, 2026 at 7:47 pm

    But when displaying my app on 2.x the
    contact list is not complete. In some
    devices it’s shown as empty, and in
    some devices it only displays some of
    the contacts in the device.

    Correct. The old Contacts API only accesses contacts stored solely on the device, not those that were obtained via syncing from other providers. There was also a bug with Android 2.0 where you did not even get the locally-stored contacts, though that was fixed with Android 2.0.1 IIRC.

    So the question is: How to correctly
    implement contact list for both 2.x
    and 1.x android version?

    For minor version-specific changes (e.g., you just need the right Uri), you can just use reflection, as shown in this sample project.

    If your needs are more complex, you can take advantage of conditional classloading by creating an interface (or abstract base class) and two implementations, one for each API level, and only use the right one. That is demonstrated in this sample project.

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

Sidebar

Related Questions

I am doing an e-learning application using CakePHP. The problem is that I need
Problem I have a UDPlistener application that I need to write a unit test
I need to implement a shell script that kills a process. The problem is
I have an interesting SQL problem that I need help with. Here is the
My specific problem is that I need to execute a (potentially) large number of
Problem I have some pages that need dynamic data from website to generate output
Problem There are data gaps that need to be filled. Would like to avoid
The problem is this: I have multiple competing threads (100+) that need to access
I bumped into this problem when I created a chart that need a axis
The problem is that recently on my company we need to make an installer,

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.