I want my try to start an intent that uses an another application. But if that application is not installed on that phone i want to show a dialog to inform the user to install the app. I tried the code below:
try {
startActivity(i);
} catch (Exception e) {
AlertDialog.Builder b = new AlertDialog.Builder(getApplicationContext());
b.setMessage("Message Here");
b.create().show();
}
`