aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik <patrik@ptjwebben.se>2020-01-15 20:49:48 +0100
committerPatrik <patrik@ptjwebben.se>2020-01-15 20:49:48 +0100
commitc8560ac42e4e6a00a92a5a6f09bcd3ca67b1f0b3 (patch)
treedfcce55f561e1df2fe8ab875660f1ef63aebf9e5
parent2c9056ac903ef4a87f714a66e12a0a43048a9154 (diff)
downloaddsub-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.
-rw-r--r--app/build.gradle2
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java17
2 files changed, 13 insertions, 6 deletions
diff --git a/app/build.gradle b/app/build.gradle
index a87ba2b1..22bb95fa 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -5,7 +5,7 @@ android {
defaultConfig {
applicationId "github.daneren2005.dsub"
- minSdkVersion 14
+ minSdkVersion 15
targetSdkVersion 26
versionCode 202
versionName '5.4.4'
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) {}