I want to uninstall my application on button click. For this I am using following code.
Uri packageURI = Uri.parse(\"package:\"+packageName);
Intent uninstal
Uninstalling without user confirmation is not allowed to 3rd party applications.
As xDragonZ points out, a root process can crudely do this by literally removing the directory and leaving the package manager to deal with the loss, but that's not a very widely deployable solution, since AFAIK no devices ship with that capability for apps to run their own root helper process - that's a risky aftermarket modification.