My application requires an alternate contact while installing an app.When I run install & register app there are no contacts in new devices bydefault.
I have found an adb command to add an contact in 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 am unable to delete same contact after execution .
Tried multiple combination of parameters with next command, but it is not working.
adb shell am start -a android.intent.action.DELETE -t vnd.android.cursor.dir/contact -e name 'Donald Duck' -e phone 72xxxxxxxx
Please share if there is an adb command to delete contact.
EDIT : adb shell pm clear com.android.providers.contacts
command will clear all contacts from contact list.