Skip to content

Commit

Permalink
chore: add email extra to mail intent (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel authored Jan 15, 2025
1 parent 054f145 commit 769349c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ public void onResume() {
Preference pref = findPreference(getString(R.string.send_email));
if (pref != null)
pref.setOnPreferenceClickListener(preference -> {
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(getString(R.string.shareEmailTo)));
Uri uri = Uri.parse(getString(R.string.shareEmailTo));
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, uri);
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{getString(R.string.shareEmailTo).replace("mailto:", "")});
emailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.shareSubject, BuildConfig.VERSION_NAME));
emailIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.Settings_SendEmail_Message) +
"\n\n\nMANUFACTURER: " + Build.MANUFACTURER + "\nMODEL: " + Build.MODEL + "\nBOARD: " + Build.BOARD + "\nTIME: " + Build.TIME);
Expand Down

0 comments on commit 769349c

Please sign in to comment.