test if any email app is available

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-06-15 10:24:41 +02:00 committed by AndyScherzinger
parent 24aa17e648
commit 64d1d22f35
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 7 additions and 1 deletions

View file

@ -384,7 +384,12 @@ public class Preferences extends PreferenceActivity
intent.setData(Uri.parse(feedbackMail));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
if (intent.resolveActivity(getPackageManager()) != null) {
startActivity(intent);
} else {
DisplayUtils.showSnackMessage(Preferences.this, R.string.feedback_no_mail_app);
}
return true;
}

View file

@ -806,4 +806,5 @@
<string name="file_version_restored_error">Error restoring file version!</string>
<string name="outdated_server">The server has reached end of life, please upgrade!</string>
<string name="dismiss">Dismiss</string>
<string name="feedback_no_mail_app">No app available to send mails!</string>
</resources>