Questions tagged [android-contacts]
Content related to Android's Contacts APIs
2,058
questions
0
votes
0
answers
14
views
How do I Create AndroidNativePlugin for Unity
I want to create Android native plugin to open Contact app through unity. While Clicks button I need to get name and number While opening Contact app. How can I do anyone help me to find this
0
votes
0
answers
13
views
Uri is always getting null
I tried to Open my device contact via my app I was getting correct Uri meanwhile I tried to Open my device contact from Google Phone App via My app. In this case Uri is always getting null.
can any ...
0
votes
0
answers
18
views
unable to open contacts app from android webivew
Be informed we are trying to let users open contact app from a link inside android webview. So far we have tried to use shouldOverrideUrlLoading to try to grab the link and force it to start contacts ...
0
votes
1
answer
21
views
How to update my profile photo in Contacts App from another application in Android?
I want to update the profile photo and name for the User Profile in Contacts App from another app in Android. I could not find any way to do that. I have referred Android documentation to modify ...
0
votes
1
answer
41
views
How to show multiple numbers under "Mobile" label in android contact provider?
Usually there are different numbers in a single contact under different labels such as Mobile , Work , Home , Fax etc . and i can display numbers under such Labels by following code:
`while (...
0
votes
1
answer
32
views
In Android, I'm unable to set a Contacts sync adapter to be read-only
My app syncs contacts with a custom server, with a lot of custom properties. Because of that, it has a built-in contact editor for its own contacts, and I don't want the native Contacts app to allow ...
0
votes
1
answer
16
views
ContactsContract not saving some data to contacts
I'm using ContactsContract to save a lot of data to contacts (I didn't really expect the second .apply{} to work, but hey, I tried). When the activity is launched, the only fields that contain the ...
-1
votes
1
answer
57
views
Why is ContentResolver.query() returning duplicate entries from contacts?
So I'm reading in these contacts using Android's native implementation, using a test phone with about 1,056 contacts on it. The problem I'm having is that it's rather slow, so I'm logging the outcomes ...
1
vote
0
answers
44
views
How to implement a contentobserver specifically for contacts
I am looking a way to handle this case when I would expect some service gets a notificaction when the contact database changed... but I dont find an example how to implement this class(for example a ...
0
votes
1
answer
149
views
Select and extract contact details using Intent and ActivityResultContracts
I have a button to open and select a contact for some of it's specific data - name and number using ActivityResultContracts.PickContact. Using the guide from this page and some modifications, I was ...
0
votes
0
answers
46
views
Force to sync contacts from sim card
I am inserting contact to sim card programmatically.
final Uri uri = Uri.parse("content://icc/adn");
ContentValues mContentValue = new ContentValues();
mContentValue.put("tag", ...
2
votes
0
answers
51
views
Are Directory Contacts removed in Android 11+?
I'm working on a contact directory integration. I know that I had this feature on an older phone and want to integrate this feature for my own app. Technical is my question similar to Provide the ...
1
vote
2
answers
36
views
Android Resolver Query for CalendarContract?
I am trying to write an app to dump Calendar entries for reference and backup. To get started, I tried to dump the column names of the CalendarContract using the code below but it always fails with an ...
0
votes
1
answer
115
views
How can I edit the phone number of a contact in Kotlin?
I have got a contact data class with the unique contact ID and want to change the phone number of the contact.
Here's the data class:
data class Contact(
val id : String,
val name : ...
-1
votes
1
answer
108
views
How to add a Contact in Android using Kotlin? [duplicate]
I've got the following data class:
data class Contact(
val id : String,
val name : String,
val number : String)
I now want to add a Contact to the Contact list of the phone ...
0
votes
0
answers
30
views
How to get runtime permission for contact and sync
How to get user contact list & every time need to sync and update in react native android project. Im new to this.
0
votes
0
answers
23
views
How to get sim contacts, phone contacts, Google Contacts separately in listview
I already get the Contact of sim here is the code
try{
String m_simPhonename = null;
String m_simphoneNo = null;
Uri simUri = Uri.parse("content://icc/adn");
Cursor ...
0
votes
0
answers
36
views
I am not able to show contacts on an activity using recycler view in android studio
I am trying to show contacts on invite activity using recycler view but could not manage to show I have taken contact permission on recent page and here is my code.
in model there are only 2 ...
1
vote
0
answers
26
views
Contact_Remover class isn't "catching" my contacts in Android Studio
For some reason, my Remove_Contacts activity, mainly called Main_Remove_Contacts, which should (at least I think) automatically link to the contacts the phone has, is not, and instead shows no ...
0
votes
1
answer
44
views
How to delete a specific contact by pressing it, in Android Studio?
So I made this question but nobody answered: How to identify a contact by pressing it in Android Studio?
Maybe because it was hard to understand, so I'll explain in a short manner.
How can I remove a ...
0
votes
0
answers
32
views
How to identify a contact by pressing it in Android Studio?
I want to delete a certain contact, but not by finding its ID or name or etc..., just by pressing it and asking if I'm sure I want to do it.
I've made some questions about this topic but the real way ...
1
vote
1
answer
77
views
Android Content provider. How to get all data by one request from contact book
Is it possible to retrieve all data from contact book by one request (phone number, email, first name, last name, photo, thumbnail). Right now I am running a separate request for a first and last name,...
1
vote
1
answer
586
views
Android, MVVM: call ContentResolver in ViewModel
I am currently refactoring my code structure to the MVVM-Design-Pattern.
In the official android.com documentation (https://developer.android.com/topic/libraries/architecture/viewmodel) they write the ...
1
vote
0
answers
80
views
Android / SQLite: How to ignore PHONEBOOK collation?
I want to migrate my contacts from my old android phone to my noew android phone.
I do it on my computer with an SQL editor, called SQLite Expert Personal 5.4
DELETE FROM [raw_contacts] says:
No such ...
0
votes
1
answer
102
views
Android ContactsContract How to fill Prefix, Suffix structuredname fields via new Intent?
Most developers complain about the difficult API when trying to create an android system contact.
I want to create one with an intent, that is the contact app opens and has filled the appropiate ...
0
votes
1
answer
192
views
Android, Contacts Contract: store and retrieve custom data
In an attempt to learn how androids ContacsContract works, I tried to add a custom entry to a contact. A whole day of reading docs, tutorials and watching youtube videos later, I am still not really ...
1
vote
1
answer
189
views
Android: Foreground service with broadcast receiver stop working when changing contacts
So I have this Android (API 29) app where I'm using a foreground service that is running a broadcast receiver so the app can detect incoming calls while closed or when the user reboots the device for ...
0
votes
1
answer
68
views
URISyntaxException: Expected scheme name at index 0 in VCard android
I am exporting contacts from device using below dependency:
implementation 'com.googlecode.ez-vcard:ez-vcard:0.11.3'
While exporting, some times, Users facing issue in live application on play store. ...
1
vote
1
answer
99
views
For ActivityResultContracts, what is the alternative for In-App Updates?
I am restructuring my code to use ActivityResultContracts, and I've been able to recreate the old way of doing things with onActivityResult by passing in "codes" with my Intents and just ...
0
votes
1
answer
92
views
Android. Retrieve first name and last name from contact book by phone number
I am trying to get first name and last name in contact book by phone number.
Here is my code:
Uri contactUri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(...
1
vote
1
answer
154
views
How to display contact name and number sorted by address in android studio
I have to display contact name and number in recycler view. But, the sorting order should be by address which means that if a contact has address saved with it, then it should be displayed in first ...
0
votes
0
answers
117
views
React native open whatsapp without knowing country code
I'm fechting the contacts data from user then show a list so user can sent invite& download message to his friends.App will be used in 3+ countrys(might be). The problem is many of record( to my ...
0
votes
1
answer
90
views
How to update multiple groups to contact on android?
I just success to insert multiple group to a contact, but failed to update multiple group on a contact. my code just update only 1 group, not all the list of groupsId (see below)
private fun ...
0
votes
1
answer
56
views
What's the alternative of "ContactsContract.Contacts.LAST_TIME_CONTACTED"?
What should I use instead of ContactsContract.Contacts.LAST_TIME_CONTACTED? According to documentation, LAST_TIME_CONTACTED variable was deprecated. Even it was written in ContactsContract.class
/** @...
0
votes
0
answers
44
views
Phone Contacts Sync
I am using the below code, to sync phone contacts with the app that I have built. It works fine but only copies contacts having a phone number. It ignores contacts with only email address, I cant seem ...
1
vote
1
answer
36
views
event_start always returning contact number in android
Why ContactsContract.CommonDataKinds.Event.START_DATE always returning contact number. The number is available in Google Contacts.
Here what I am doing...
Cursor c;
if (contactID==""...
0
votes
1
answer
49
views
I'm trying to extract phone number from CommonDataKinds.Phone using contact ID from ContactsContract,Phone
The following error message is produced whenever user presses Yes button when requested permission to access contacts.
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:...
1
vote
1
answer
226
views
Android Contact Picker Has Different Behavior Across Versions
I am trying to get the email + display name of a single contact on android without requesting contact permission. I have a bit of code that works great on a device with Android 28
// This gets ...
1
vote
1
answer
78
views
Android: get contacts with anniversary date event
I want to fetch a list of local contacts with an anniversary date set.
I'm doing the following:
object WithAnniversary {
const val INDEX_CONTACT_ID = 0
const val INDEX_CONTACT_NAME = 1
...
0
votes
1
answer
135
views
Unable to fetch deleted contacts from ContactsContract.Contacts.CONTENT_URI
I am trying to fetch deleted contacts from Android contacts table. After searching some Stack Overflow links, best way to fetch the deleted contacts is by using ContactsContract.DeletedContacts. I am ...
0
votes
1
answer
83
views
Custom title for links on contacts
I am working on an app which saves users social networks links in the default contacts app provided by Android OS.
I am able to save link in the app but I am not able to customize the title as you can ...
0
votes
2
answers
227
views
Android Getting Contact List is not Showing in Android 10
I am trying to get contact list in android. It is working fine in andorid 6 and 7. But when I run the same code in andorid 10 it is not showing any single contact. Is there any changes in Android 10?
...
0
votes
1
answer
103
views
Obtaining Email Addresses of Specific Contact Without Permissions
I can easily get a list of every email address for every Contact using the following example snippets:
//...
private val getPerson = registerForActivityResult(PickContact()) {
it?.also { ...
1
vote
2
answers
173
views
get contact list in an array
Cursor c;
ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();
c=getContentResolver().query(ContactsContract.CommonDataKinds....
0
votes
1
answer
107
views
Select one contact number from a list of multiple contact numbers
I want to fetch only the first contact number from a list of contact numbers of a particular user, with the help of cursor. Here is my code:
private ArrayList<ArrayList<String>> ...
2
votes
2
answers
126
views
ContactsContract.CommonDataKinds.Event.START_DATE includes contact phone number
I retrieve all events of contacts with the code below:
Uri uri = ContactsContract.Data.CONTENT_URI;
ContentResolver cr = context.getContentResolver();
String[] projection = new String[]{
...
1
vote
1
answer
145
views
How to get the first name of a contact in Android?
I'm trying to get the information of my contacts using ContactsContract and what I need to do, is to get only the first name of the contact. I used ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME ...
1
vote
1
answer
59
views
Android: how to provide data about numbers from application database to android phone app - recents
How can I make android default phone app take the assigned name to the number from my application database and show it?
An example of what I want to achieve:
Number XXX-XXX-XXX called me yesterday ...
0
votes
0
answers
36
views
Choose contact procedure not working on Android 4.4.4
In my Android app, a button click triggers this function, which is used to let the user choose a phone number from his contact list.
private void addContact () {
Intent intent = new Intent (Intent....
0
votes
1
answer
90
views
Unable to delete specific number in a Contact in Android
I'm working on an application in which I should be able to access all the contacts, able to update or delete the numbers in any contact.
I want to delete few numbers in a contact. I'm using ...