mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 09:01:30 +01:00
Add report issue to nav menu in beta releases
This commit is contained in:
@@ -230,6 +230,22 @@ public class Helper {
|
||||
return intent;
|
||||
}
|
||||
|
||||
static Intent getIntentIssue(Context context) {
|
||||
String version = BuildConfig.VERSION_NAME + "/" +
|
||||
(Helper.hasValidFingerprint(context) ? "1" : "3") +
|
||||
(Helper.isPro(context) ? "+" : "");
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.setPackage(BuildConfig.APPLICATION_ID);
|
||||
intent.setType("text/plain");
|
||||
try {
|
||||
intent.putExtra(Intent.EXTRA_EMAIL, new String[]{Helper.myAddress().getAddress()});
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.title_issue_subject, version));
|
||||
return intent;
|
||||
}
|
||||
|
||||
static int dp2pixels(Context context, int dp) {
|
||||
float scale = context.getResources().getDisplayMetrics().density;
|
||||
return Math.round(dp * scale);
|
||||
|
||||
Reference in New Issue
Block a user