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

The Archive Base Latest Questions

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

I am creating a Bluetooth sync application with Outlook Express. All of the work

  • 0

I am creating a Bluetooth sync application with Outlook Express. All of the work has been done fantastically well but I have one small problem left. When I sync my contacts from Outlook to Android it merges the contacts with similar names. For instance, if I have two contacts called “Najhi” and “Najhi Ullah” then after syncing they will be merged in Android under one name “Najhi”. Is there any solution to separate all merged contacts programmatically?

  • 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-24T17:03:24+00:00Added an answer on May 24, 2026 at 5:03 pm

    I have found the solution on my own if anyone have the same problem, they can find this post.

      private void separate_merged_contacts(){
        Cursor cur1 = obj.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI,new String[]{"_id"} , null, null,null);
        Cursor cur_raw;
        ArrayList<String> raw_contact_id = new ArrayList<String>();
        ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
        while (cur1.moveToNext()) {
            raw_contact_id.clear();
            ops.clear();
            for (int i = 0; i < cur1.getColumnCount(); i++) {
            cur_raw = obj.getContentResolver().query(ContactsContract.RawContacts.CONTENT_URI, new String[]{ContactsContract.RawContacts._ID}, ContactsContract.RawContacts.CONTACT_ID+"=?",new String[]{cur1.getString(cur1.getColumnIndex(ContactsContract.Contacts._ID))} , null);
            while(cur_raw.moveToNext()){
                for (int i = 0; i < cur_raw.getColumnCount(); i++) {
                    raw_contact_id.add(cur_raw.getString(cur_raw.getColumnIndexOrThrow(ContactsContract.RawContacts._ID)));
                }
            }
            for(int i=0 ; i<raw_contact_id.size();i++){
                for(int j=0;j<raw_contact_id.size();j++)
                    ops.add(ContentProviderOperation.newUpdate(ContactsContract.AggregationExceptions.CONTENT_URI)
                            .withValue(AggregationExceptions.TYPE,AggregationExceptions.TYPE_KEEP_SEPARATE)
                            .withValue(AggregationExceptions.RAW_CONTACT_ID1,Integer.parseInt(raw_contact_id.get(i)))
                            .withValue(AggregationExceptions.RAW_CONTACT_ID2,Integer.parseInt(raw_contact_id.get(j))).build());
                    try {
                        obj.getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
                    } catch (Exception e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating Bluetooth custom application, but I have a small issue. When in my
I'm creating a simple WP7 app, to have all network settings in one place,
I have an Android Bluetooth application which manages a couple of remote devices( Capsules
I'm creating an app that has a bluetooth connection. I've created a library that
Creating a voting system just like stackoverflow. Questions like this have been asking several
Creating a call stack diagram We have just recently been thrown into a big
i am creating a bluetooth based server program in Bluez which basically handles connections
Creating a JApplet I have 2 Text Fields, a button and a Text Area.
I am trying to create a Service for my application which will negotiate Bluetooth
Creating an installer for possible remote systems so that if they do not have

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.