Re: [android-developers] Search a contact using phone number

2012-04-14 Thread Justin Anderson
> > I mean to say, on emulator I am able to get the contact name. But on on my > phone I am not able to get the contacts name. before this code I did this: > > String displayName = "?" > after looking for contact name I did: > msgDialog.setTitle("From : "+

Re: [android-developers] Search a contact using phone number

2012-04-14 Thread Atif Farrukh
I mean to say, on emulator I am able to get the contact name. But on on my phone I am not able to get the contacts name. before this code I did this: String displayName = "?" after looking for contact name I did: msgDialog.setTitle

Re: [android-developers] Search a contact using phone number

2012-04-14 Thread Justin Anderson
> > The problem is, its working on emulator but not working on my mobile device > What exactly do you mean by "not working"? Is it crashing? Are you getting an exception? Does your mobile device catch on fire? Does the code cause your lights to turn on and off? Thanks, Justin Anderson MagouyaWar

[android-developers] Search a contact using phone number

2012-04-14 Thread Atif Farrukh
I would like to retrieve the name of the contact associated with an incoming message number. I came up with the following code. Uri lookupUri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(msgSender)); Cursor c = getContentResolver().query(lookupUri, new String[]{Co