I have an App which provides you a list of various apps that you can download and install from Play Store to earn goodies. Now, I don\'t want a user to uninstall
This snippet will log all the main activities of the apps installed on you device, you just have to check that list for a given app
final Intent mainIntent = new Intent(Intent.ACTION_MAIN, null);
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List pkgAppsList = getPackageManager().queryIntentActivities( mainIntent, 0);
for(ResolveInfo resolve : pkgAppsList)
{
Log.d("MY_APP", resolve.toString());
}
Hope it helps!