diff options
author | Scott Jackson <daneren2005@gmail.com> | 2016-06-13 08:13:04 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2016-06-13 08:13:04 -0700 |
commit | 20dfbfb4d85a9003ee26a2806c231c7cc46bf742 (patch) | |
tree | 6c29b57192ca8962c26626d3f0328ccd7b58dd19 /app/src/main | |
parent | 806a1463d4b149a50121aaa1e311cd911de6031d (diff) | |
download | dsub-20dfbfb4d85a9003ee26a2806c231c7cc46bf742.tar.gz dsub-20dfbfb4d85a9003ee26a2806c231c7cc46bf742.tar.bz2 dsub-20dfbfb4d85a9003ee26a2806c231c7cc46bf742.zip |
Add build to logs
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java | 6 |
1 files changed, 4 insertions, 2 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 4f5f7e6b..8c2fa4bf 100644 --- a/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java +++ b/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java @@ -1,6 +1,7 @@ package github.daneren2005.dsub.fragments; import android.content.Intent; +import android.content.pm.PackageInfo; import android.content.res.Resources; import android.net.Uri; import android.os.Build; @@ -270,7 +271,7 @@ public class MainFragment extends SelectRecyclerFragment<Integer> { private void getLogs() { try { - final String version = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName; + final PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0); new LoadingTask<String>(context) { @Override protected String doInBackground() throws Throwable { @@ -373,10 +374,11 @@ public class MainFragment extends SelectRecyclerFragment<Integer> { footer += "\nDevice Name: " + Build.MANUFACTURER + " " + Build.PRODUCT; footer += "\nROM: " + Build.DISPLAY; 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 " + version + " Error Logs"); + 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); } |