In my app, I have a database of phone numbers. Each phone number has a name assigned to it.
When user receives incoming call from number that he has not saved in his contacts database I want to display name from my database instead of unknown label...
Is it possible? How can I achieve this?
Would it be possible to also display some additional labels? For example caller's company, gender, age... (all those information will be pulled from my database of course)
So I did some research and found this.
To change display name of incoming call number, I have to add a new contact. That may not be the best approach since it will create contact in user's contacts and will be preserved even after uninstalling the app...
Another option is to display overlay view on which can be shown name (and other labels) from my database. I think I will go with this solution...
My app lets the user select a contact using the contact picker. Afterward lets user selects one or phone phone number to be stored for later use (the numbers are stored in the db)
The trivial solution would have been to save the selected numbers to the database as strings. However I would like to avoid duplicating parts of the the device's contacts list and keep a link (e.g. a URI to a particular number) to that contact.
so far was not able to find a way to do that, the documentation states that the contact id itself might change, So I can only assume it also true for the contacts phone number.
am I missing something ?
I want to make an option in my app that shows all contacts who are using this application. Its just comparable with the WhatsApp contact tab which is showing there names,status and picture.
I had the idea that I just upload the phonebook contacts with there phone number into my database and I would be able to match these contacts later.
Example :
If person "A" has the phone number of B in his phonebook(which is in the database) AND If person "B" has the number of "A" in the phonebook (which is also in Database) THEN match them and make them Visible as friends in the App.
I wanted to realize this through mysql. BUT now theres my problem :
What if the person A or B did not saved his friend with for example a area code or country code but the other did ? So they wouldn't be able to be matched in my database.
Is there a way to normalize the phone numbers before uploading them into my database ? That means that the app automatically adds there area code or location code ?
On my Android phone I have a special contact set in my Contact List called "Personal Profile" that obviously does not appear in the contact list because contain my personal informations.
I know that in other phones this contact is called in a different way... but is there...
I want to access this contact from my app so I have one more chance to get the user phone number. (I know, there is a calssic method that query the SIM, but in italy 80% of sims have that field empty)
Do you know how could I get that contact info?
I've been reading for a couple hours now, trying to figure out how to maintain a reliable list of contacts in an Android application, but still cannot find one clear successful case.
My situation is this: I let users create Groups in my application, and in each Group, the user can select, from their contact list on the phone, which users they'd like to add to that group. I then need to be able to have a reliable way to compare a call from an incoming contact with my contacts database in my application, to see if they are in specific groups.
The easy parts are to add specific contacts to my database, and also to look up a contact based on their phone number. Thanks to this forum they are easy anyway! :) I'm storing the contacts in my database by Contact Name, Lookup Key, and Contact Id. The hard part for me, and this is what I cannot find a clear answer on, is how do I know that a month down the road, Contact X is going to have the same Lookup Key or Contact Id as when they were added? Couldn't they all change by then? Obviously the name can easily change, but can't the lookup_key and Contact ID also change? I've read about the lookup_key changing if contacts are manually aggregated. In other words, I am looking for the identifiable information for a contact that CANNOT change once they are entered?
I have read about using a ContentObserver to register for changes to the Contacts database, but I don't see that this helps me at all, since if I have Contact X with Lookup Key Y and Contact ID of Z, even if I get updated that the Contacts have changed, I still need to match Contact X in my application with Contact X in the Contacts database to update my info, which I still cannot do if the identifying information has been changed.
For example, I have a contact with Name, Lookup_Key, ContactID of Ted, 230ff392, 3209482. A month later, could it happen that what used to be Ted is now T-bone, 458ee247, 5502981? If this were the case, I cannot use these 3 identifiers as a means to look up the contact.
Thanks so much for the help on this!
Paul
I don't know where you read that the lookup key might change, but the documentation states that they are permanent in contrary to contact ids.
Contacts Provider / Contacts:
The ContactsContract.Contacts table also has the column LOOKUP_KEY
that is a "permanent" link to the contact row. Because the Contacts
Provider maintains contacts automatically, it may change a contact
row's _ID value in response to an aggregation or sync. Even If this
happens, the content URI CONTENT_LOOKUP_URI combined with contact's
LOOKUP_KEY will still point to the contact row, so you can use
LOOKUP_KEY to maintain links to "favorite" contacts, and so forth.
This column has its own format that is unrelated to the format of the
_ID column.