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 { } else {
Intent intent = new Intent(Intent.ACTION_VIEW); Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(systemAccount); intent.setData(systemAccount);
try {
startActivity(intent); startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(ContactDetailsActivity.this, R.string.no_application_found_to_view_contact, Toast.LENGTH_SHORT).show();
}
} }
} }
}; };