Clearing the Phone's contact list (or supplement with a user provided List of Contacts)

Hi experts.

I've developed an application that creates users in the Phone's contact list using the contents of a Text file.

The problem is that all the extensions I've found that deal with contacts only allow new contacts to be added and not the modification of existing contacts.

For me with would be enough to have the possibility of clearing the contact list and then re-importing all the contacts again, but I wasn't able to find an extension that could do that either.

Any suggestions?

Best Regards,
Rui

1 Like

Perhaps @vknow360 can comment on why/how deletion of contacts is possible/not possible with AI2 extensions ?

You can try Contacts Saver.

It's possible if you have Write Contacts permission.

1 Like

Hi.

That's the one I'm using. But how can I modify/delete a contact? I'm only able to add new information.

Best Regards,
Rui

Have you tried zeroing or null entries a contact ?

How could I do that? I only see "Add" methods...

Will sure add once I complete the pending projects.

1 Like

You can download v2 from here:

2 Likes

Hi, good afternoon.

Thank you very much! What are the new functionalities?

Rui

1 Like

Welcome.

Update and Delete methods.

2 Likes

That's Great!

You don't happen a delete all method? :slight_smile:

Rui

You can delete only what you have created, for now.

2 Likes

So you mean if I create a contact manually on the phone I can't delete if from an App?

Rui

At least for now.

I took a look at the new functionalities and in order to update or delete a contact we need to know their rawcontactid...which we only get after we create a contact.

Is there any way to get this value for existing contacts?

Rui

Hello Rui

There is a security issue here. If anyone could make an App that deleted the device's whole contact list, that could be used maliciously. Google are constantly tightening the security of Android to prevent that kind of thing.

If you are the owner of the device, you can use the tools that Android and/or the device manufacturer provides.

3 Likes

Hi Chris,

I understand that, but I'm trying to develop an application that completely manages the contacts. The goal of the application is to ensure that all the company's phone have the correct contact list, and not contacts randomly added by the users. That's why I need to delete everything prior to writing the new contact list.

...That's not a reason Google would go along with, but if the App is not distributed via Google Play Store, it could work - however in practise, Company Users often have good reason to add bonafide contacts, so deleting all contacts would most certainly be counter productive and you would swiftly become very unpopular :grin:

I think the best way to have a Company List of contacts would be to make a list specific to the App. No Android security breach and you could have a central list that all Users could update with their genuine new company contacts and all devices could, on notification, download the updated list. The security of those contact's details though needs to be, at a minimum, excellent, what ever you decide to do..

1 Like

This is an internal network Chris. We can only call contacts inside our network, so there is no point in users creating their own Contacts.

The application I've developed allows users to make calls, but if the contacts are not in the phone's contact list, they can't see the name of the caller when they receive a call.

So that is a vote in favour of having a list dedicated to the App - you can ensure the Users can access the network's contacts and simply not provide any functionality for adding new contacts other than downloading an updated central list.