catch activity not found when trying to open contact app

This commit is contained in:
Daniel Gultsch 2019-02-07 21:39:30 +01:00
parent bfaf10aa72
commit 310362130f
1 changed files with 5 additions and 1 deletions

View File

@ -139,7 +139,11 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
} else {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(systemAccount);
startActivity(intent);
try {
startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(ContactDetailsActivity.this, R.string.no_application_found_to_view_contact, Toast.LENGTH_SHORT).show();
}
}
}
};