diff options
author | Patrik <patrik@ptjwebben.se> | 2020-01-15 20:49:48 +0100 |
---|---|---|
committer | Patrik <patrik@ptjwebben.se> | 2020-01-15 20:49:48 +0100 |
commit | c8560ac42e4e6a00a92a5a6f09bcd3ca67b1f0b3 (patch) | |
tree | dfcce55f561e1df2fe8ab875660f1ef63aebf9e5 /app/src | |
parent | 2c9056ac903ef4a87f714a66e12a0a43048a9154 (diff) | |
download | dsub-c8560ac42e4e6a00a92a5a6f09bcd3ca67b1f0b3.tar.gz dsub-c8560ac42e4e6a00a92a5a6f09bcd3ca67b1f0b3.tar.bz2 dsub-c8560ac42e4e6a00a92a5a6f09bcd3ca67b1f0b3.zip |
Fix for extra data not being passed to email intent when sending log files. Requires the minSdk to be bumped one step to 15 but that shouldn't really be a problem today.
Diffstat (limited to 'app/src')
-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) {} |