My application requires an alternative contact when installing the application. When I launch the application for installation and registration, no contacts are made in the new devices.
I found the adb command to add a contact to my contact list
adb shell am start -a android.intent.action.INSERT -t vnd.android.cursor.dir/contact -e name 'Alternate Contact' -e phone 72xxxxxxxx
But now I canβt delete the same contact after execution. I tried several combinations of parameters with the following command, but it does not work. adb shell am start -a android.intent.action.DELETE -t vnd.android.cursor.dir/contact -e name 'Donald Duck' -e phone 72xxxxxxxx
Share if there is an adb command to delete a contact.
EDIT: adb shell pm clear com.android.providers.contacts
command will clear all contacts from the contact list.
source share