diff options
author | Scott Jackson <daneren2005@users.noreply.github.com> | 2020-02-07 22:08:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 22:08:55 -0800 |
commit | a7ffaf53c5c73dc59b69e13bc3d0f809641f8bb4 (patch) | |
tree | b38e813b1237c2cfdb91f33aa0ec828dbfbef773 /app/src/main/java/github | |
parent | 0f22342867fd805fe5320c900e05da410216f2e1 (diff) | |
parent | c8560ac42e4e6a00a92a5a6f09bcd3ca67b1f0b3 (diff) | |
download | dsub-a7ffaf53c5c73dc59b69e13bc3d0f809641f8bb4.tar.gz dsub-a7ffaf53c5c73dc59b69e13bc3d0f809641f8bb4.tar.bz2 dsub-a7ffaf53c5c73dc59b69e13bc3d0f809641f8bb4.zip |
Merge pull request #980 from Kakadua/fix-intentextradata
Fix for send log not working properly
Diffstat (limited to 'app/src/main/java/github')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java index e7c7f1fb..0d7e8af1 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java @@ -380,11 +380,18 @@ public class MainFragment extends SelectRecyclerFragment<Integer> { footer += "\nLogs: " + logcat; footer += "\nBuild Number: " + packageInfo.versionCode; - Intent email = new Intent(Intent.ACTION_SENDTO, - Uri.fromParts("mailto", "dsub.android@gmail.com", null)); - email.putExtra(Intent.EXTRA_SUBJECT, "DSub " + packageInfo.versionName + " Error Logs"); - email.putExtra(Intent.EXTRA_TEXT, "Describe the problem here\n\n\n" + footer); - startActivity(email); + + Intent selectorIntent = new Intent(Intent.ACTION_SENDTO); + selectorIntent.setData(Uri.parse("mailto:")); + + final Intent emailIntent = new Intent(Intent.ACTION_SEND); + emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{"dsub.android@gmail.com"}); + emailIntent.putExtra(Intent.EXTRA_SUBJECT, "DSub " + packageInfo.versionName + " Error Logs"); + emailIntent.putExtra(Intent.EXTRA_TEXT, "Describe the problem here\n\n\n" + footer); + emailIntent.setSelector( selectorIntent ); + + startActivity(Intent.createChooser(emailIntent, "Send log...")); + } }.execute(); } catch(Exception e) {} |