Recently I am working on a Mobile Device Management application in that i implemented a case to delete an application from device remotely but the problem is user have to click on uninstall button to proceed .But as i think if we are managing the device and it should not be and it is sure that user will not click on uninstall button.
So is there any way so that so we can delete an application without user prompt or we can something like automatically click on uninstall button when the activity called.
Intent uninstallIntent = new Intent(Intent.ACTION_DELETE);
uninstallIntent.setData(Uri.parse("package:" + packageName));
uninstallIntent.setAction(Intent.ACTION_VIEW);
uninstallIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(uninstallIntent);
I am using this code calling uninstall activity.