I need to construct PackageUri in order to uninstall package using action.delete. I obtained PackageInfo object using PackageMananger. Is there any way to construct PackageUri using PackageInfo?
thanks.
I need to construct PackageUri in order to uninstall package using action.delete. I obtained PackageInfo object using PackageMananger. Is there any way to construct PackageUri using PackageInfo?
thanks.
I got it, lets say we have PackageInfo pinfo
String pkg= "package:"+ pinfo.packageName;
Uri pkg_uri= Uri.parse(pkg);
Now we have package uri, to uninstall
Intent intent = new Intent(Intent.ACTION_DELETE, pkg_uri);
startActivity(intent);