Am trying to uninstall application from my application using the below code
try
{
Log.e ( TAG, " Going to clear the application with startactivity alone " );;
Uri packageURI = Uri.parse("package:"+"com.example.canvas");
Intent uninstallIntent = new Intent(Intent.ACTION_UNINSTALL_PACKAGE, packageURI);
//uninstallIntent.putExtra(Intent.EXTRA_UNINSTALL_ALL_USERS, allUsers);
startActivityForResult(uninstallIntent, REQUEST_UNINSTALL);
Log.e ( TAG, " Cleared the applicaiton " );
}
catch ( Exception e )
{
String data = e.getMessage();
Log.e ( TAG, " data " + data );
}
But am getting an execption and the exception says
09-26 16:16:52.519: E/FActory reset(17246): data No Activity found to handle Intent { act=android.intent.action.UNINSTALL_PACKAGE dat=package:com.example.canvas }