I have code to delete the contact group with the contact group id like this and is also working…
ContentValues values = new ContentValues();
values.put(ContactsContract.Groups._ID, 4444);
getContentResolver().delete(ContactsContract.Groups.CONTENT_URI,values.toString(),null);
but I want to perform this deletion at the time of un-installation of the application in Android device.So what I have to do or which function can be used at uninstalling time?
So can you suggest me something?
Sorry, You cannot get control or perform any task when your application is uninstalled.
Unfortunately there is currently no way for an Android package to execute code when it is removed. However, you can register a
BroadcastReceiverforACTION_PACKAGE_REMOVEDin a different package that will be called when packages are removed from the phone.Look at this question Perform a task on uninstall in android