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

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.

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.

Using Blocks, what you can do with the Phone Call component is PhoneCall ; what you can do with the Contact List is in ContactPicker.

It appears it is not possible to do what you want to do with the System phone app which App Inventor polls using the ContactPicker and PhoneCall. You cannot completely delete and replace your users system Contact List. An extension might be the solution but the advice provided by @vknow360 is only a partial 'solution' using his extension. So what might be possible to finish your app?

  1. decide to use Android Studio etc. to create your own way to handle phone calls and contacts to circumvent the system phone call or
  2. use your own Company allowed contacts list of phones that are valid intercompany calls to achieve as much of what you hope to do using App Inventor as advised by @ChrisWard .

Here are some possible Blocks to consider (not tested) that may help you continue your development using AI2 blocks. Something like this is what is possible as far as I can tell.

The PhoneCall component can identify a phonenumber; the blocks show how to associate that number with a user name. Does this work?

2 Likes

I thought it is good practice to not give developer complete control over the device.
Once someone erased sd card in his phone using FileTools extension. :pensive:
So it would be better to delete only what you have created, though what @rmcpdias is looking for is possible.

2 Likes

vknow360Regular
If you could create such a function I would be eternally grateful :slight_smile:

Please don't be offended, but since is such a tall order, maybe we could discuss some kind of monetary compensation?

Extension has been updated.


Now you can get rawContactId from phone number.

2 Likes

Thank you very much vknow360.

As soon as I have the chance to test it I will let you know.

1 Like

You can ask for paid help here:

But please do not request methods to breach Google Android security

1 Like

I think the concept of your contact management app is superb. Every company / organization need such central data contact details real time updated and accessible through mobile. I am trying to make same sort of contact management app for my community. I would like to know if your app is lauched on play store and running ?