Added report issue

pull/147/head
M66B 6 years ago
parent fdda618630
commit 53bc5db0c5

@ -71,6 +71,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.text.Collator;
import java.util.ArrayList;
@ -189,30 +190,35 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
case R.string.menu_operations:
onMenuOperations();
break;
case R.string.menu_pro:
onMenuPro();
break;
case R.string.menu_setup:
onMenuSetup();
break;
case R.string.menu_legend:
onMenuLegend();
break;
case R.string.menu_faq:
onMenuFAQ();
break;
case R.string.menu_issue:
onMenuIssue();
break;
case R.string.menu_privacy:
onMenuPrivacy();
break;
case R.string.menu_about:
onMenuAbout();
break;
case R.string.menu_rate:
onMenuRate();
case R.string.menu_pro:
onMenuPro();
break;
case R.string.menu_invite:
onMenuInvite();
break;
case R.string.menu_rate:
onMenuRate();
break;
case R.string.menu_other:
onMenuOtherApps();
break;
@ -314,6 +320,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
if (Helper.getIntentFAQ().resolveActivity(getPackageManager()) != null)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_question_answer_24, R.string.menu_faq));
if (!BuildConfig.PLAY_STORE_RELEASE)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_report_problem_24, R.string.menu_issue));
if (Helper.getIntentPrivacy().resolveActivity(getPackageManager()) != null)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_account_box_24, R.string.menu_privacy));
@ -802,13 +811,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
sm.setDynamicShortcuts(shortcuts);
}
private Intent getIntentRate() {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + BuildConfig.APPLICATION_ID));
if (intent.resolveActivity(getPackageManager()) == null)
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID));
return intent;
}
private Intent getIntentInvite() {
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
@ -817,6 +819,13 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
return intent;
}
private Intent getIntentRate() {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + BuildConfig.APPLICATION_ID));
if (intent.resolveActivity(getPackageManager()) == null)
intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + BuildConfig.APPLICATION_ID));
return intent;
}
private Intent getIntentOtherApps() {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("https://play.google.com/store/apps/dev?id=8420080860664580239"));
@ -897,6 +906,22 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
Helper.view(this, this, Helper.getIntentFAQ());
}
private void onMenuIssue() {
try {
String version = BuildConfig.VERSION_NAME + "/" +
(Helper.hasValidFingerprint(this) ? "1" : "3") +
(Helper.isPro(this) ? "+" : "");
Intent issue = new Intent(Intent.ACTION_SEND);
issue.setPackage(BuildConfig.APPLICATION_ID);
issue.setType("text/plain");
issue.putExtra(Intent.EXTRA_EMAIL, new String[]{Helper.myAddress().getAddress()});
issue.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.title_issue_subject, version));
startActivity(issue);
} catch (UnsupportedEncodingException ex) {
Helper.unexpectedError(this, this, ex);
}
}
private void onMenuPrivacy() {
Helper.view(this, this, Helper.getIntentPrivacy());
}
@ -907,6 +932,16 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
fragmentTransaction.commit();
}
private void onMenuPro() {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
private void onMenuInvite() {
startActivity(getIntentInvite());
}
private void onMenuRate() {
Intent faq = Helper.getIntentFAQ();
if (faq.resolveActivity(getPackageManager()) == null)
@ -930,16 +965,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
}
}
private void onMenuPro() {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
private void onMenuInvite() {
startActivity(getIntentInvite());
}
private void onMenuOtherApps() {
Helper.view(this, this, getIntentOtherApps());
}

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/>
</vector>

@ -54,14 +54,17 @@
<string name="title_notification_failed">\'%1$s\' failed</string>
<string name="menu_setup">Setup</string>
<string name="menu_answers">Templates</string>
<string name="menu_operations">Operations</string>
<string name="menu_setup">Setup</string>
<string name="menu_legend">Legend</string>
<string name="menu_faq">Support</string>
<string name="menu_pro">Pro features</string>
<string name="menu_issue">Report issue</string>
<string name="menu_privacy">Privacy</string>
<string name="menu_about">About</string>
<string name="menu_pro">Pro features</string>
<string name="menu_invite">Invite</string>
<string name="menu_rate">Rate this app</string>
<string name="menu_other">Other apps</string>
@ -492,6 +495,7 @@
<string name="title_debug_info">Debug info</string>
<string name="title_debug_info_remark">Please describe the problem and indicate the time of the problem:</string>
<string name="title_crash_info_remark">Please describe what you were doing when the app crashed:</string>
<string name="title_issue_subject" translatable="false">FairEmail %1$s issue</string>
<string-array name="downloadNames">
<item>16 KB</item>

Loading…
Cancel
Save