CallDirectoryExtention - How to remove a phone number entry that has already been added if a specific value is retrieved.

The App has the ability to use WebKit and display web pages and the ability to add phone numbers to CallDirectory at specific timing.

In this App, when the App is launched or when the Add Contact button on the web page is pressed, CallDirectoryExtention is reloaded from the host app (WebKit-viewController), the phone number is retrieved from the server, and the entry is updated.

I would like to add a process to remove the already added phone number entry when a specific value is retrieved from the application server.

The specific process we wish to implement is as follows. Step 1: Use URLsession to retrieve values from the application server. (ViewController) Step 2: If the value is a specific value, call a Function that deletes the CallDirectoryExtention entry. (ViewController) Step 3: Delete all entries for the registered phone numbers.
 However, I am aware that I have to use reloadExtension() to call the CallDirectoryExtention process from ViewController on Step2. if I do so, CallDirectoryHandler.beginRequest() will be processed, and I am wondering if it is not possible to execute only the Function that deletes the entry.

Is there a way to run only the Function that deletes the CallDirectoryExtention entry from the host app(viewController)?

Answered by DTS Engineer in 823982022

Is there a way to run only the Function that deletes the CallDirectoryExtention entry from the host app(viewController)?

No, that's not currently possible.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Accepted Answer

Is there a way to run only the Function that deletes the CallDirectoryExtention entry from the host app(viewController)?

No, that's not currently possible.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

I came up with a way that might solve this problem.


At first, setup an App group for the host app and CallDirectoryExtention,

The host app sets the flag to UserDefault when a specific value is obtained and reloads the CallDirectoryExtention, so that the CallDirectoryHandler can refarence at the flag in UserDefault and if the flag is the specific value, run removeAllIdentificationEntries() only.


I think that with above method, it is possible to only delete the CallDirectoryExtention entries when a specific value is obtained in the host app, is this wrong?

I think that with above method, it is possible to only delete the CallDirectoryExtention entries when a specific value is obtained in the host app, is this wrong?

No. More specifically, you're call directory extension has full control over the configuration it's created, whether that's deleting all entries, or only adding/removing specific ones.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

CallDirectoryExtention - How to remove a phone number entry that has already been added if a specific value is retrieved.
 
 
Q