Filter Contacts By Phone Number?

Mar 5, 2012

I try to make "type-to" filter in the my dialer. When I tap a digit, there must be a list (ListView) of supposed contacts (all of them have a number containing a part from my dialer TextView). For example, if I tap 555, there must be presented contacts with such numbers:

555890856
555789734
895550123

1st attempt:

Code:
String phoneNumberPart = //this is the part of phone number. Only part!
final Uri baseUri = ContactsContract.Contacts.CONTENT_FILTER_URI;
final Uri uri = Uri.withAppendedPath(baseUri, Uri.encode(phoneNumberPart));
final String[] projection = CONTACTS_PROJECTION; //_ID, DISPLAY_NAME, LOOKUP_KEY
Cursor cursor = getContentResolver().query(uri, projection, null, null, null);
2nd attempt:

Code:
String phoneNumberPart = //this is the part of phone number. Only part!
final Uri baseUri = ContactsContract.PhoneLookup.CONTENT_FILTER_URI;
final Uri uri = Uri.withAppendedPath(baseUri, phoneNumberPart);
final String[] projection = CONTACTS_PROJECTION; //_ID, DISPLAY_NAME, LOOKUP_KEY
Cursor cursor = getContentResolver().query(uri, projection, null, null, null);

In both attempts cursor count is always 0, despite I dial the phone number of real contact.

Is it possible to filter contacts by this criteria, using Android uris? Or there is no way but "get all contacts, iterate over them and check their numbers"?

Filter contacts by phone number?


ADVERTISEMENT

General :: Droid 3 Contacts Have Phone Number - Same Contacts In Gmail Do Not

Jun 22, 2013

I have contacts on my Droid with phone numbers that the same contact in Gmail do not have. Some history:

I have a Droid 3. My Accounts include my main Gmail acct, a gmail acct I hardly ever use (no contacts issues there), a pop3 account and a Touchdown-Exchange account which I dont need because Im not connected to that Exchange server any longer. Some time ago, since I wasnt on the Exchange server any more, I deleted the Touchdown account. Then I realized some or most of my Google contacts had disappeared from the phone. Thinking that this would delete the same contacts from the Gmail servers when it synced, I immediately restored the Touchdown account, restoring the lost contacts to the phone. Are these 2 issues related?

View 1 Replies View Related

Android :: Filter Out Contacts From Contacts Pick List / Create New Contact

Aug 19, 2009

My application wants a functionality of picking a contact from the phone contact, I have achieved this using the following intent Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivity ForResult(intent, 001); I wanted few more functionalities
- An option to create a new contact from the pick list, similar to the one which is available in inbuilt Launcher appliation
- Set of contacts should be filtered from display i.e already selected contacts should not be displayed
- Filtering of contacts should be based on the phone number i.e a contact might have two phone numbers associated with and wants to filter out the phone number which is selected I guess above can be achieved by implementing my own pick list using contacts provider, is there any other way without implementing the new pick list

View 2 Replies View Related

Android :: Contacts - Fetch Contacts Number From Phone

Aug 2, 2010

when i am using this class it is written there use contactscontract but am not getting how to use this class to fetch contacts number from phone.....

View 9 Replies View Related

General :: Filter Contacts By Group With Contacts Contract

Sep 16, 2010

I'm developing a big application and a part of it is about contacts. I want to, first, get all the groups of contacts. And when the users selects one, show all the contacts of the group.

I've seen other applications and widgets (like LauncherPro widget or HTC Sense Widget) than can do it, but when I try, I don't get same results.

My code is:

1.- To get an example group (this is just for testing, in real application user selects):

Code:
long idGroup = 0;
String[] GROUP_PROJECTION = new String[] {
ContactsContract.Groups._ID, ContactsContract.Groups.TITLE };
Cursor c = mcp.getContext().getContentResolver().query(ContactsContract.Groups.CONTENT_URI, GROUP_PROJECTION, null, null, ContactsContract.Groups.TITLE + " ASC");

[Code]...

2.- To filter Users by group??

View 2 Replies View Related

Sprint HTC Hero :: Phone Number - Transferred Contacts From My Old Phone

Nov 4, 2009

I transferred contacts from my old phone (Samsung Instinct). One of the numbers was a voicemail for another location. On the Instinct you put in the numbers with a pause in the string which allowed you to delay entry of saved access codes until the right time. Is there a way to do this on the Hero?

View 2 Replies View Related

Android :: How To Query Contacts That Have Both A Phone Number And Name

Nov 12, 2010

I have following code in pre-Android2.0 API:

CODE:..................

What kind of selection should I do to retrieve contacts that have both name and phone number?

View 1 Replies View Related

General :: Show Only Contacts With Phone Number In ICS

Nov 29, 2011

How to make ics show only contacts with phone number? I really miss this feature, I hate seeing my contact list as an endless list with email addresses.

View 8 Replies View Related

Motorola Droid 2 :: Contacts Phone Number Not Displayed

Sep 16, 2010

I got my Droid 2 a couple weeks ago, and I'm having two problems with my contacts list: 1) For some contacts, the phone numbers aren't displayed when I view the contact. To see the numbers, I have to edit the contact. This is only true for some, not all. Is there a setting somewhere that this is controlled? 2) Sometime when I go into my contact list, I see a list of social media items for my contacts instead of their names (which is very frustrating). What controls this?

View 3 Replies View Related

General :: Multiple Contacts That Share Same Phone Number

Nov 14, 2012

Just switched from a PalmPre+ and am still trying to learn about ICS on my Droid4 but ran into something I can not seem to find a solution for:

I have several conference call contacts that share the same access number and I keep their unique access ID as part of the contact name so that I can type it in when prompted (once the call connects and the contact name is still visible on the dialer pad).

e.g.

"Adam's conferencee call code 12345678"
Work 1-800-555-1212
"Betty's conference call code 87654321"
Work 1-800-555-1212
"Charlie's conference call code 54637281"
Work 1-800-555-1212

however when manually choosing to dial from Betty's contact list, the android dialer ends up showing "Adam's conference 12345678".

is there a way to "disable the phone# look up when picking from the contact" which ends up displaying the first contact name it encounters in the alphabetically sorted list?

View 2 Replies View Related

Samsung Vibrant :: Messenger - Filter Contacts ?

Jul 17, 2010

Still new (< 2 full days) to Vibrant and Android, so I'm not sure if this should go here or in an android forum, but here it goes:

A friend recommended I download Handcent SMS, but I've found I like the built in Messenger a little better... with one caveat. Is there a way to filter the contact list to just contacts on the phone or at least contacts with numbers? It currently includes every single person on Facebook as well as apparently every person I have ever e-mailed with gmail over the last 6 years.

View 2 Replies View Related

General :: Galaxy S5 - How To Add Phone Number To Synced Facebook Contacts

May 6, 2014

I just got my galaxy S5. I synced the phone with my facebook , now I have all my facebook friends in my phone contacts but I CAN NOT edit them and add their phone number !!!

I looked everywhere on the internet and I didn't find anything ! How can I edit and add phone number to my synced facebook friends in my galaxy s 5 contacts ?!?!?

View 2 Replies View Related

Android :: How To Get Number Type For Contacts Number

Sep 6, 2010

it is opening phone contacts and when i choose one contact i can get all detail of the contact but not getting the number type of numbers; more specific >> if the user have four numbers, i can get all number but not getting number type of these numbers i.e. HOME,WORK,MOBILE)

View 2 Replies View Related

Samsung Galaxy S :: How To Filter To Show Google "My Contacts" Group?

Jul 2, 2010

Having had the Nexus one with glorious Stock Android I'm struggling with some of the Samsung 'improvements'. The primary issue for me right now is that I've got the nasty Sammy Contacts app (with it's non-maintained-aspect-ration contact pics, i HATE that) sync to Google Contacts, but it shows them all! On the N1 I could filter so that I could only view 'My Contacts' from Google, a nice limited Group I could readily maintain. I can see no option to do this on the SGS. Anyone found it? Can't wait for a stock android ROM for this beast, it is awesome but as of yet I can't see how Samsung added any value with their SW meddling.

View 6 Replies View Related

HTC Incredible :: Google Voice Number Isn't Version Cell Phone Number

May 24, 2010

I've experienced two problems with Google Voice that are causing me to get charged minutes I wouldn't usually get charged. If I can't solve them, I'll have to go back to using my Verizon number. First, let me say that I'm using a new Google Voice number that isn't Verizon cell phone number or any other preexisting number. Second, my girlfriend is on my family plan, but she doesn't have GV yet. We're using the 700-minute plan, so we don't have a friends circle.

Problem 1: When I call my girlfriend's Verizon wireless phone using the GV on my Verizon phone, I get charged, and when she calls my GV number on my Verizon Wireless phone from her Verizon wireless phone, she gets charged. We don't cash in on our free in-network calling. I know, this should have been obvious, but it just never occurred to me until after I looked at the bill. I'd be able to work with that, though, and just select "Call without using Google Voice" or whatever when calling her if it weren't for the second problem. When people call my Google Voice number, I get charged when I don't answer. Usually, it's just a one-minute charge, but sometimes it's two or three minutes (don't know why). With anything less than an unlimited plan, minutes count. Not good.

View 31 Replies View Related

General :: Forward Selective CID / Phone Number To External Number

Feb 15, 2012

Basically, i use my personal cell phone for work and personal use, i have multiple exchange accts that keep things sorted and seperated.

recently though i have been getting more and more business calls to my cell phone, during and outside of normal business hours.

what im looking for is an app that will take a selective group of contacts/phone numbers/CID strings and if it is a "business" call then forward it to a specific phone number (external number, the actual business line).

I have seen apps on the market and around that will forward calls to voicemail if they match certain filters, but i cant really seem to find an app that will forward to an external number. Any way I could accomplish this?

View 1 Replies View Related

HTC Incredible :: Filter Spam On Phone / Keyword Block Of These Ads?

Jun 1, 2010

I have a few different email accounts and on my PC I have most of the spam under control by a junk mail filter that catches almost all of what the ISP's filter doesn't. On the Incredible, however, those ads still get through and it's annoying of course. If I could just even get rid of the Viagra ads, I'd be happy, because there wouldn't be much spam left if they were gone. I figure there has to be a way to do a keyword block of these ads but I just can't figure this out on here. Any ideas?

View 1 Replies View Related

HTC Droid Eris :: Need Content Filter Apps For Phone

Sep 24, 2010

Anyone know of any apps that will allow a parent to set a content filter on the Eris so a kid can't access adult themed websites (porn etc)? The subject came up at work and it sounded like something worth looking in to, but the best I could find was a content filter service from Verizon (for free) but it seems that it also prevents Google Navigator, Facebook and YouTube from working properly (they all load just fine, but crazy error codes come up which prevent you from getting any further). Also of note: this only works when using the 3G service, as WiFi has no problems accessing Nav, FB and YT.

View 4 Replies View Related

Android :: How To Filter ListView Based On User Input's In Phone?

Nov 14, 2010

I need to filter List View as per the user's input in the Edit Text Field.If the user Enter the letter 'a' i need to show the list items starts with 'a'.Can anyone give some ideas to me to solve this ? Thanks in advance?

View 2 Replies View Related

General :: Contacts Same Number

Jun 16, 2013

i have problem with contacts and its frustrating google account did some stupid things and now i have same number in multiple forms and i dont know how to get rid of it.

number 0123456789
number 012-345-6789
number 012 345 6789

in some contacts its shown 2-3 times somewhere 1 (just like it should be).i want get rid of these same numbers (tried duplicate contacts and id doesnt work).if needed manually BUT set it on google account right way without sync it back in these chaos state

View 2 Replies View Related

Android :: Need Kalman Filter To Fliter Gyroscope And Acceleration Data From An Droid Phone

May 15, 2010

Is there a Kalman filter implementation I can use to fliter my gyroscope and acceleration data from an Android Phone?

View 3 Replies View Related

HTC Desire :: Number Not Available From Contacts List

Jun 9, 2010

If i goto call the other half from my contacts list, it says that hs number is not available If I dial it manually, it connects ok. If I interrogate the contact details the number is correct except that the desire has automatically changed the number from 0781. to 44781 without a + infront of it. Could this be a the problem? If he calls me, the number displayed is the same as the contact details. I have noticed however that his facebook picture is an old one. Could it have something to do with the number that he has on his facebook profile.

View 2 Replies View Related

Android :: SMS App That Only Uses Contacts Mobile Number?

Sep 19, 2010

I am frustrated that when I search for contacts in my HTC Legends SMS app "messages", as I type it provides every matching contact including those without a mobile number, and for each match it shows me every single contact address I have, emails, landlines etc.Is there an SMS app that only provides contacts who have a mobile number in their contact details,and only shows me the mobile numbers for those contacts?

View 2 Replies View Related

Android :: Get Mobile Number From Contacts

Sep 12, 2010

I tried so much tutorials, and read a lot here at SO When a button is clicked, the user can choose the mobile number of a contact. Actual I can get the name of the selected contact, but i can't find a way, to get/chose the mobile number.

View 2 Replies View Related

Android :: Adding A + Or Any Other Code Before The Number In Contacts

Feb 17, 2010

I've been having a major problem with my contacts list since moving my contacts from a Blackberry to a Motorola Droid.

Lots of my contacts have phone numbers under one name, separated by a "+" or a calling code. If the phone number is exactly the same, only one number shows up in the Droid's contact. I never get the choice to pick the numbers inside the contact. This is a big problem for people who travel and need the "+" to make international calls or have a calling code before the number when they travel.

I made a contact called test. I added the number 11111111111 under home, then I added +11111111111 under mobile, then I added 2211111111111 under work. When you look for the contact test you should only see the choice to call 11111111111. The other numbers under the contact never show up.

View 3 Replies View Related

HTC Incredible :: Setting Up Primary Number In Contacts

Sep 7, 2010

I thought that there was a default setting to change all numbers in Contacts to list a particular number (mobile, home, work, etc). I would like all of my contact's primary numbers to call home numbers and not mobile numbers. However, some of them are set to Work as primary while others are set to Home. How do I change this? Thanks

View 4 Replies View Related

HTC Hero :: Saving A Mobile Number To Contacts

Sep 1, 2010

After I've received a phone call you can choose to add that number to contacts.All seems to work fine and it shows up for a short time on my phone and it appears to have stuck no problem.After a few minutes through the name has dropped off and it does not show up in either my contacts on the phone or to the contacts in my Google listing online.Am I missing something please? I always choose to save to Google, not SIM or Phone. I assume that's right?

View 12 Replies View Related

Android :: Speak Contacts Name Or Number When Get Call Or Text?

Apr 27, 2010

Is there an app/add-on for Android that will speak my contacts name or number when I get an incoming call or text? I absolutely LOVE that feature about my Dare and will miss it greatly. Helps me know if I need to get the phone out of my pocket for an important call or if it can go to voicemail. Is there a feature in Android that can speak my contacts to me...like "call from Dad's Cell" or "message from Robert" like my LG Dare?

View 1 Replies View Related

HTC Wildfire :: Contacts Number Changed When Syncing With Facebook

Sep 21, 2010

This is one of the first problems I encountered when I used HTC Sense to Sync my contacts with facebook. This is what it was like before I synced with facebook.

E.g.
Georgia Bowman
Call mobile.
07xxxxxxxxx
Send message.
07xxxxxxxxx
After Syncing, there DP is up, aswell as email address etc. It also changed the number to
44xxxxxxxxxx

I've found a solution. Go to a contact with the 44xxxxxxxxxx number. Ensure the contact is still linked to facebook
Menu > Edit
This brings up the Edit screen
Scroll down, Then add.
On the Drop down, select Phone > Work
Now, providing you only had one number for that person, you should have two fields. One called Mobile with their number this format 07xxxxxxxxx. (If its in the +44xxxxxxxxx format, then change it to the 07xxxxxxxxx format)
Press on the top field (the original one), then copy all.
Select the field called work, then press on the field, hold, and paste.
Now press Menu > Save.
Now press and HOLD the field called Call work, and set this as your primary number.
Once primary number is on the field called call work, you can now go to Menu > Edit.
Now delete the Field labeled Mobile
Go to the field called work, then change the label to Mobile.
Menu > Save.

This will now stay as your contacts primary number.
E.g.
Georgia Bowman
Call mobile.
07xxxxxxxxx
Send message.
07xxxxxxxxx
Instead of having 44xxxxxxxxx

View 3 Replies View Related

Incredible :: HTC Bungle Primary Number / E-mail In Contacts

May 3, 2010

Ok. So I've switched from a Moto Droid to an Incredible. The contacts are a bit different. I'm having a problem, and HTC customer service says there's no solution. With the Droid you could choose to label a number for a contact (assuming the contact has multiple numbers or e-mails) as the primary number. I never figured out how to get rid of any primary designation, but that's another matter. Well, with the Incredible, the People app automatically designates a number as primary. You can change the primary number, but you can't eliminate it, which is annoying for two reasons: 1. in the dialer, when you type the person's name only the primary number comes up and 2. in the People app when you tap on the contact's photo to get the methods of contacting and then press phone, it auto dials the primary number only. I have several contacts who use multiple numbers with equal frequency. Plus, to top it off, HTC's People app listed the wrong number as the primary in many instances, which means I have to go through all my contacts on the phone. This is a phone-specific feature and is unrelated to Google contacts. So, that's my complaint today. It's purely about functionality, and it applies equally to e-mail addresses as well as phone numbers.

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved