Hi,
I am working with the android ContactsContract.PhoneLookup class, and I needed some help with it.
ContactsContract.PhoneLookup | Android Developers
What I am trying to do is check if a given number is on my contacts list or not, regardless of type. So my logic was get the incoming number, and use the cursor and query provided by this class to see if the given numbers matches a number on the contacts list. If not, then it should be forwarded to voicemail, but I will worry about that later.
Now I understand I can use my own cursor and obtain all the numbers, get the incoming number, and write my own method to check, but I really want to use this class because it is highly optimized.
When I tested this out, I saw that the number will show on screen (I made this happen with a TextView) only if the number I entered the for Uri.encode is on my contacts list. When I change the number so that it is not on my contacts list, then nothing is shown on screen. Why? I made a TextView to show the number, but nothing is shown.
Can you please help?
Thanks!
I am working with the android ContactsContract.PhoneLookup class, and I needed some help with it.
ContactsContract.PhoneLookup | Android Developers
What I am trying to do is check if a given number is on my contacts list or not, regardless of type. So my logic was get the incoming number, and use the cursor and query provided by this class to see if the given numbers matches a number on the contacts list. If not, then it should be forwarded to voicemail, but I will worry about that later.
Now I understand I can use my own cursor and obtain all the numbers, get the incoming number, and write my own method to check, but I really want to use this class because it is highly optimized.
When I tested this out, I saw that the number will show on screen (I made this happen with a TextView) only if the number I entered the for Uri.encode is on my contacts list. When I change the number so that it is not on my contacts list, then nothing is shown on screen. Why? I made a TextView to show the number, but nothing is shown.
Can you please help?
Thanks!