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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T15:45:23+00:00 2026-05-24T15:45:23+00:00

I am currently developing an App which needs to look up a number of

  • 0

I am currently developing an App which needs to look up a number of contacts (name and photo) via their phone number.
However, this takes several seconds (For each contact: Look up the contact via their phone number, get contact’s name & photo).

What would be a good strategy to speed this process up? I realize that I could use my own sqlite db which contains a list of exactly those names and photos I need. With such a database I could only do one query, then get the data for all contacts I need at once. This however would add quite some overhead I am hoping to avoid.

Is there a better (speak: simpler) solution?

Thank you.

  • 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-24T15:45:26+00:00Added an answer on May 24, 2026 at 3:45 pm

    you can use CursorAdapter and override bindView() method for example:

    @Override
    public void bindView(final View view, Context context, final Cursor cursor) {
        holder = (ItemHolder) view.getTag();
        ImageView icon = holder.getImageView();
        TextView name = holder.getName();
        final TextView email = holder.getEmail();
        icon.setBackgroundResource(R.drawable.contact_icon);
        name.setText(cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)));
    
    
        final int contactid = cursor.getInt(cursor.getColumnIndex("_id"));
        mHandler.post(new Runnable() {
    
            @Override
            public void run() {
                Cursor emailCursor = getContentResolver().query(ContactsContract.CommonDataKinds.Email.CONTENT_URI, null, "contact_id=?", new String[]{String.valueOf(contactid)}, null);
                startManagingCursor(emailCursor);
    //          Log.i("cursor:", emailCursor.getCount()+"");
                if(emailCursor!=null){
    
                    if(emailCursor.getCount()==0){
                        email.setText("");
                    }else {
                        while(emailCursor.moveToNext()){
                            String emails = emailCursor.getString(emailCursor.getColumnIndex("data1"));
                            email.setText(emails);
                        }
                    }
    
                }
                emailCursor.close();
            }
        });
    

    you would use ContactsContract.CommonDataKinds.Phone.CONTENT_URI instead of ContactsContract.CommonDataKinds.Email.CONTENT_URI .

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

Sidebar

Related Questions

I'm currently developing an app which needs to send authentication data with it to
I'm currently developing an app which will use a Linq to SQL (or possibly
I'm currently in the process of developing an app which has some very demanding
I am currently developing a Silverlight 3 app that needs some sort of user
I currently have a Python app I am developing which will data carve a
currently we are developing an app in which we use database table to store
Currently I'm developing an Android app which draws a point on the coordinates input
I am currently developing an app which, on launch, pings a server which returns
I am currently developing an android app where I create a notification Intent which
I'm developing an Android app which needs to download a lot of data. To

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.