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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:31:16+00:00 2026-06-07T03:31:16+00:00

I started building my app for api 13, because I thougth it could be

  • 0

I started building my app for api 13, because I thougth it could be efficient enough for the most users.
But i changed it to api 10.
Then the following code stopped working `

             String empName=data.getStringExtra("name");
             String hourPay=data.getStringExtra("hourPay");
             String key="";
             String id=""; 

            Uri lookupUri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_FILTER_URI, empName);
            Cursor idCursor = getContentResolver().query(lookupUri, null, null, null, null);                

            idCursor.moveToFirst();
            id = idCursor.getString(idCursor.getColumnIndex(ContactsContract.Contacts._ID));
            key = idCursor.getString(idCursor.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));`

The problem is that it works only with contact names written in English or the ones that have just name (not surname)

For example :
It works for the following contacts :
Express Service,
George,
Maria Mpakou,
Σοφια,
With no distinction between languages

But when a contact is written in my language (greek) and has space (e.g Αιμιλιος Δημιος) it returns the underneath cursor with index out of bounds.

When i first tried at api 13 worked like a charm.
By the way my Android.Manifest has utf-8 encoding if that has something to do with it
Please any recomendation will bw helpfull.
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-07T03:31:17+00:00Added an answer on June 7, 2026 at 3:31 am

    After a lot of search i finally did it with a different way…like asking a Sql query to all contacts

    Here is the code:

    String empName=data.getStringExtra("name");
    Cursor idCursor = getContentResolver().query(                 
    ContactsContract.Contacts.CONTENT_URI,null,Contacts.DISPLAY_NAME+" = '"+empName+"'", null, null);
    

    That worked like a charm!

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

Sidebar

Related Questions

I'm just getting into using REST and have started building my first app following
I've started building an app with Flex/Air but am getting sick of it's clunkyness.
I've just started out building a very simple score screen for my app but
Just getting started building an app using the v6 of the facebook c# sdk
I am building an app to learn Django and have started with a Contact
I have just started building a app using XihSolutions.DotMSN.dll version: 2.0.0.40909, My problem is
To learn ASP.net I started building a todo web app(web forms not MVC), this
I just started building an app using X-Code 4.2. I created the app with
I started using Wing IDE and it's great. I'm building a wxPython app, and
I started building an app with protobuf 2.2.0 as it was the latest. Now

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.