diff --git a/build.gradle b/build.gradle
index 7a79935fb..3669126e7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,8 +50,8 @@ ext {
compileSdkVersion = 28
targetSdkVersion = 28
buildToolsVersion = '28.0.3'
- versionCode = 43
- versionName = "1.1.3"
+ versionCode = 44
+ versionName = "1.1.4"
javaCompileVersion = JavaVersion.VERSION_1_8
diff --git a/org.envirocar.app/AndroidManifest.xml b/org.envirocar.app/AndroidManifest.xml
index 2f2c23525..de8e0bd88 100644
--- a/org.envirocar.app/AndroidManifest.xml
+++ b/org.envirocar.app/AndroidManifest.xml
@@ -3,8 +3,8 @@
xmlns:tools="http://schemas.android.com/tools"
package="org.envirocar.app"
android:installLocation="internalOnly"
- android:versionCode="43"
- android:versionName="1.1.3">
+ android:versionCode="44"
+ android:versionName="1.1.4">
diff --git a/org.envirocar.app/res/layout/report_issue_checkbox_item.xml b/org.envirocar.app/res/layout/report_issue_checkbox_item.xml
index 359d5e05a..3569ef3dd 100644
--- a/org.envirocar.app/res/layout/report_issue_checkbox_item.xml
+++ b/org.envirocar.app/res/layout/report_issue_checkbox_item.xml
@@ -19,35 +19,29 @@
with the enviroCar app. If not, see http://www.gnu.org/licenses/.
-->
-
+ android:layout_height="wrap_content">
+ android:layout_marginLeft="16dp" />
-
\ No newline at end of file
+ android:layout_gravity="center"/>
+
+
\ No newline at end of file
diff --git a/org.envirocar.app/res/layout/send_log_layout_new.xml b/org.envirocar.app/res/layout/send_log_layout_new.xml
index 82804ce9f..9ed6a3542 100644
--- a/org.envirocar.app/res/layout/send_log_layout_new.xml
+++ b/org.envirocar.app/res/layout/send_log_layout_new.xml
@@ -18,158 +18,134 @@
with the enviroCar app. If not, see http://www.gnu.org/licenses/.
-->
-
+ android:layout_height="match_parent"
+ android:orientation="vertical">
-
+
+ android:layout_height="match_parent"
+ android:paddingHorizontal="8dp">
+ android:orientation="vertical"
+ android:layout_marginVertical="8dp">
-
-
-
+ android:layout_marginBottom="12dp"
+ android:fontFamily="@font/roboto_light1"
+ android:lineSpacingExtra="1.5dp"
+ android:text="@string/report_issue_text" />
+ android:orientation="horizontal"
+ android:layout_marginHorizontal="16dp"
+ android:layout_marginVertical="8dp">
-
+ android:hint="@string/report_issue_minutes">
+
+
+
+
-
+ android:layout_marginHorizontal="16dp"
+ android:layout_marginVertical="8dp"
+ android:hint="@string/problem_description">
-
+
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/org.envirocar.app/res/values-de/strings.xml b/org.envirocar.app/res/values-de/strings.xml
index 729912e2c..47fe14530 100644
--- a/org.envirocar.app/res/values-de/strings.xml
+++ b/org.envirocar.app/res/values-de/strings.xml
@@ -52,8 +52,10 @@
Willkommen, %sAuf Wiederstehen, %s
+ Beschreiben Sie Ihr Problemhttp://www.envirocar.org
+ Kategorien:Imperiale Maßeinheiten?
@@ -86,15 +88,15 @@
Ungefährer Zeitpunkt:10:00
+ Keine Kategorie ausgewählt
+ Sie haben keines der Kategorien markiert. Diese helfen jedoch den Entwicklern, Probleme zu kategorisieren und schneller zu lösen. Bitte erwägen Sie, die relevanten Felder auszufüllen.
+ Bericht trotzdem senden
+
Zeitstempel werden automatisch in die Protokolle aufgenommen. Das Senden von Berichten an uns hilft uns,
- unerwartetes Verhalten oder Abstürze zu reproduzieren. Das macht enviroCar besser und stabiler.
- Klicken Sie auf die Schaltfläche Senden unten, um diesen Bericht per EMail an uns zu senden.
- Diese Funktion verwendet die Standardeinstellung \"Senden an\".
- Wenn Sie es mit Ihrem EMail-Client aufrufen, können Sie den Bericht ganz einfach per EMail versenden.
- Wenn Sie keinen EMail-Client installiert haben, können Sie die Protokolldatei auf einem PC speichern,
- z.B. über Bluetooth oder USB. \n\nIn solchen Fällen bitten wir Sie, das Berichtspaket manuell einzusenden.
- Sie werden an den folgenden Stellen aufbewahrt:
+ unerwartetes Verhalten oder Abstürze zu reproduzieren. Dadurch können wir enviroCar stabilisieren und verbessern.
+ Klicken Sie auf unten auf die Schaltfläche "Bericht Senden", um diesen Bericht per EMail inklusive Protokolldaten an uns zu senden.
+ Diese Funktion verwendet die Standardeinstellung \"Senden an\".Eine detailliertere BeschreibungBericht Absenden
@@ -137,4 +139,8 @@
Die enviroCar App benötigt für die Aufzeichnung von Fahrten weitere Berechtigung, die Sie im Folgenden manuell bestätigen können. Hierzu gehört zum einem die genaue Positionsbestimmung des Smartphones, damit gesammelte Parameter einer Fahrt im Raum verortet werden können, und zum anderen die Schreibberechtigung auf den externen Speicher, damit Logs generiert und im Falle von Fehlverhalten durch die Funktion "Problem melden" an uns übermittelt werden können.
+
+
+
+ Attributauswahl
diff --git a/org.envirocar.app/res/values/strings.xml b/org.envirocar.app/res/values/strings.xml
index 9cd4a98c2..3109359fb 100644
--- a/org.envirocar.app/res/values/strings.xml
+++ b/org.envirocar.app/res/values/strings.xml
@@ -82,20 +82,18 @@
OK
-
-
-
Driving
+ Categories:*This is a GPS based track. It cannot be uploaded to the open data.Sign in to upload your tracks
-
+ Describe your ProblemSubmit
- Start Today. \nJoin the Community.
+ Start Today. \nJoin the Community.
@@ -111,13 +109,15 @@
Time since crash:in minutes
+ No Checkbox Selected
+ You have not selected any of the checkboxes. These help developers sort through issues quickly and resolve them. Please consider filling those that are relevant.
+ Send Report Anyway
+
Timestamps are automatically included in the logs. Sending us reports helps us reproduce unexpected behavior or crashes.
This makes enviroCar better and more stable. Click the send button below to email this report to us.This feature uses the default \"Send To\" mechanism.
- If you invoke it with your Email client, you can easily send the report via email. If you do not have an Email client installed,
- you can save the log file on a PC, e.g. through Bluetooth or USB. \n\nIn such cases we appreciate sending
- in the reporting bundle manually. They are stored at the following locations:
+ If you invoke it with your Email client, you can easily send the report via email.
A more detailed descriptionSend Report
@@ -135,7 +135,6 @@
[FEATURE REQ]
-
@@ -153,7 +152,6 @@
pref_automatic_uploadprefkey_gps_mode_ar
-
@@ -173,9 +171,13 @@
Track Upload ErrorError while uploading to the enviroCar platform.
-
The enviroCar App requires additional permissions for recording tracks, which you can confirm manually in the following. This includes the exact positioning of the smartphone, so that collected parameters of a journey can be spatially located, and the write permission to the external memory, so that logs can be generated and transmitted via the "Report issue" function.
+
+
+
+
+ Attribut Selection
diff --git a/org.envirocar.app/src/org/envirocar/app/views/others/SendLogFileActivity.java b/org.envirocar.app/src/org/envirocar/app/views/others/SendLogFileActivity.java
index d0590d105..20577726e 100644
--- a/org.envirocar.app/src/org/envirocar/app/views/others/SendLogFileActivity.java
+++ b/org.envirocar.app/src/org/envirocar/app/views/others/SendLogFileActivity.java
@@ -19,32 +19,26 @@
package org.envirocar.app.views.others;
import android.app.Activity;
-import android.content.DialogInterface;
import android.content.Intent;
-import android.graphics.Color;
import android.net.Uri;
-import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.Nullable;
-import androidx.appcompat.app.AlertDialog;
-import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
-import android.preference.PreferenceManager;
import android.util.Pair;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
-import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ListAdapter;
import android.widget.ListView;
-import android.widget.TextView;
+
+import com.afollestad.materialdialogs.MaterialDialog;
import org.envirocar.app.BaseApplicationComponent;
import org.envirocar.app.R;
@@ -58,7 +52,6 @@
import org.envirocar.core.logging.LocalFileHandler;
import org.envirocar.core.logging.Logger;
import org.envirocar.core.util.Util;
-import org.envirocar.core.utils.CarUtils;
import java.io.File;
import java.io.FileFilter;
@@ -73,6 +66,7 @@
import javax.inject.Inject;
+import butterknife.BindArray;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
@@ -92,22 +86,21 @@ public class SendLogFileActivity extends BaseInjectorActivity {
private static final String OTHER_DETAILS_PREFIX = "extra-info";
private static final String EXTENSION = ".zip";
- @BindView(R.id.report_issue_header)
- protected EditText title;
+ @BindView(R.id.envirocar_toolbar)
+ protected Toolbar toolbar;
@BindView(R.id.report_issue_time_since_crash)
protected EditText whenField;
@BindView(R.id.report_issue_desc)
protected EditText comments;
- @BindView(R.id.report_issue_log_location)
- protected TextView locationText;
- @BindView(R.id.toolbar)
- protected Toolbar toolbar;
@BindView(R.id.report_issue_submit)
- protected Button submitIssue;
+ protected View submitIssue;
@BindView(R.id.report_issue_checkbox_list)
protected ListView checkBoxListView;
- @BindView(R.id.report_issue_other_file)
- protected TextView otherFileLocation;
+
+ @BindArray(R.array.report_issue_subject_header)
+ protected String[] subjectHeaders;
+ @BindArray(R.array.report_issue_subject_tags)
+ protected String[] subjectTags;
@Inject
protected CarPreferenceHandler mCarPrefHandler;
@@ -115,8 +108,6 @@ public class SendLogFileActivity extends BaseInjectorActivity {
protected BluetoothHandler mBluetoothHandler;
protected List checkBoxItems;
- protected List subjectHeaders;
- protected List subjectTags;
protected String extraInfo;
@Override
@@ -132,40 +123,15 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
- getSupportActionBar().setTitle(R.string.report_issue_header);
+ getSupportActionBar().setTitle("");
- AsyncTask.execute(() -> {
- subjectHeaders = Arrays.asList(getResources().getStringArray(R.array.report_issue_subject_header));
- subjectTags = Arrays.asList(getResources().getStringArray(R.array.report_issue_subject_tags));
- set();
- });
+ setCheckboxes();
- File reportBundle = null;
try {
removeOldReportBundles();
-
- final File tmpBundle = createReportBundle();
- final File otherFile = createVersionAndErrorDetailsFile();
- reportBundle = tmpBundle;
- if (reportBundle != null) {
- LOG.info("Report Location: " + reportBundle.getAbsolutePath());
- locationText.setText(reportBundle.getAbsolutePath());
- } else {
- LOG.info("Error: Report is NULL.");
- locationText.setError("Error allocating report bundle.");
- locationText.setText("An error occured while creating the report bundle. Please send in the logs available at " +
- LocalFileHandler.effectiveFile.getParentFile().getAbsolutePath());
- }
- if (otherFile != null) {
- otherFileLocation.setText(otherFile.getAbsolutePath());
- } else {
- LOG.info("Error creating the versions txt file.");
- }
} catch (IOException e) {
LOG.warn(e.getMessage(), e);
}
-
-
}
@OnClick(R.id.report_issue_submit)
@@ -175,7 +141,7 @@ public void onClickSubmitButton(View v) {
if (checkIfCheckboxSelected()) {
sendLogFile(tmpBundle);
} else {
- createDialog(tmpBundle);
+ createNoCheckboxDialog(tmpBundle);
}
} catch (Exception e) {
LOG.warn(e.getMessage(), e);
@@ -183,15 +149,13 @@ public void onClickSubmitButton(View v) {
}
/**
- * function to set the names for the checkboxes
+ * function to setCheckboxes the names for the checkboxes
*/
public void setCheckBoxes() {
- List totalList = new ArrayList<>();
- totalList.addAll(subjectHeaders);
- for (int i = 0; i < totalList.size(); i++) {
+ for (String subjectHeader : subjectHeaders) {
CheckBoxItem temp = new CheckBoxItem();
temp.setChecked(false);
- temp.setItemText(totalList.get(i));
+ temp.setItemText(subjectHeader);
checkBoxItems.add(temp);
}
}
@@ -208,23 +172,6 @@ public void onPause() {
hideKeyboard(getCurrentFocus());
}
- /**
- * @return true if at least one checkbox is ticked
- */
- public boolean checkIfCheckboxSelected() {
-
- LOG.info("Checking checkboxes.");
- for (int i = 0; i < checkBoxItems.size(); i++) {
- CheckBoxItem dto = checkBoxItems.get(i);
- LOG.info("Checkbox " + i + " : " + dto.isChecked());
- if (dto.isChecked()) {
- LOG.info("Ticked Checkbox found.");
- return Boolean.TRUE;
- }
- }
- LOG.info("No checkboxes ticked.");
- return Boolean.FALSE;
- }
/**
* In case no checkbox has been ticked, a dialog is created urging the getUserStatistic to do so,
@@ -232,29 +179,18 @@ public boolean checkIfCheckboxSelected() {
*
* @param reportBundle
*/
- public void createDialog(File reportBundle) {
- AlertDialog.Builder builder = new AlertDialog.Builder(SendLogFileActivity.this);
- builder.setMessage("You have not selected any of the checkboxes. These help developers " +
- "sort through issues quickly and resolve them. Please consider filling those that " +
- "are relevant.")
- .setTitle("No Checkbox Selected")
- .setCancelable(false)
- .setPositiveButton("Go Back", (dialog, which) -> {
-
- })
- .setNegativeButton("Send Report Anyway", (dialog, which) -> sendLogFile(reportBundle));
- AlertDialog alertDialog = builder.create();
- alertDialog.setOnShowListener(new DialogInterface.OnShowListener() {
- @Override
- public void onShow(DialogInterface dialog) {
- alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE).setTextColor(Color.parseColor("#7DB7DC"));
- alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).setTextColor(Color.parseColor("#0065A0"));
- }
- });
- alertDialog.show();
+ public void createNoCheckboxDialog(File reportBundle) {
+ new MaterialDialog.Builder(this)
+ .title(R.string.report_issue_no_checkbox_selected_title)
+ .content(R.string.report_issue_no_checkbox_selected_content)
+ .positiveText(R.string.report_issue_no_checkbox_send_anyway)
+ .negativeText(R.string.cancel)
+ .cancelable(false)
+ .onPositive((materialDialog, dialogAction) -> sendLogFile(reportBundle))
+ .onNegative((materialDialog, dialogAction) -> LOG.info("Log report not send"))
+ .show();
}
-
/**
* creates a new {@link Intent#ACTION_SEND} with the report
* bundle attached.
@@ -262,7 +198,6 @@ public void onShow(DialogInterface dialog) {
* @param reportBundle the file to attach
*/
protected void sendLogFile(File reportBundle) {
-
Intent emailIntent = new Intent(android.content.Intent.ACTION_SENDTO);
emailIntent.setType("message/rfc822");
emailIntent.setData(Uri.parse("mailto:"));
@@ -334,10 +269,10 @@ protected String getCarBluetoothNames() {
*/
protected String createSubject() {
StringBuilder subject = new StringBuilder();
- for (int i = 0; i < subjectTags.size(); i++) {
+ for (int i = 0; i < subjectTags.length; i++) {
CheckBoxItem dto = checkBoxItems.get(i);
if (dto.isChecked()) {
- subject.append(subjectTags.get(i));
+ subject.append(subjectTags[i]);
}
}
return subject.toString();
@@ -370,9 +305,7 @@ private String createEmailContents() {
private String createComments() {
StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append("Summary: ");
- stringBuilder.append(title.getText().toString());
- stringBuilder.append("\n");
+ stringBuilder.append("Description: ");
stringBuilder.append(comments.getText().toString());
stringBuilder.append("\n");
return stringBuilder.toString();
@@ -497,10 +430,24 @@ public static void setListViewHeightBasedOnChildren(ListView listView) {
listView.setLayoutParams(params);
}
+ /**
+ * @return true if at least one checkbox is ticked
+ */
+ private boolean checkIfCheckboxSelected() {
+ for (int i = 0; i < checkBoxItems.size(); i++) {
+ CheckBoxItem dto = checkBoxItems.get(i);
+ if (dto.isChecked()) {
+ return Boolean.TRUE;
+ }
+ }
+ return Boolean.FALSE;
+ }
+
+
/**
* Gets the strings for the checkboxes and sets the adapter
*/
- public void set() {
+ private void setCheckboxes() {
checkBoxItems = new ArrayList<>();
extraInfo = new String();
setCheckBoxes();
diff --git a/org.envirocar.app/src/org/envirocar/app/views/trackdetails/MapExpandedActivity.java b/org.envirocar.app/src/org/envirocar/app/views/trackdetails/MapExpandedActivity.java
index 52cab0b42..0f92ca83b 100644
--- a/org.envirocar.app/src/org/envirocar/app/views/trackdetails/MapExpandedActivity.java
+++ b/org.envirocar.app/src/org/envirocar/app/views/trackdetails/MapExpandedActivity.java
@@ -83,34 +83,24 @@ public class MapExpandedActivity extends BaseInjectorActivity {
@BindView(R.id.activity_map_follow_fab)
protected FloatingActionButton mCentreFab;
-
@BindView(R.id.activity_map_visualise_fab)
protected FloatingActionButton mVisualiseFab;
-
@BindView(R.id.activity_track_details_expanded_map_cancel)
protected ImageView mMapViewExpandedCancel;
-
@BindView(R.id.activity_track_details_expanded_map)
protected MapView mMapViewExpanded;
-
@BindView(R.id.activity_track_details_expanded_map_container)
protected ConstraintLayout mMapViewExpandedContainer;
-
@BindView(R.id.legendCard)
protected CardView legendCard;
-
@BindView(R.id.legend)
protected ImageView legend;
-
@BindView(R.id.legend_start)
protected TextView legendStart;
-
@BindView(R.id.legend_mid)
protected TextView legendMid;
-
@BindView(R.id.legend_end)
protected TextView legendEnd;
-
@BindView(R.id.legend_unit)
protected TextView legendName;
@@ -189,14 +179,11 @@ protected void onClickFollowFab() {
protected void onClickVisualiseFab() {
LOG.info("onClickVisualiseFab");
AlertDialog.Builder b = new AlertDialog.Builder(this);
- b.setTitle("Phenomena to Visualise");
- b.setItems(spinnerStrings.toArray(new String[0]), new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialogInterface, int i) {
- dialogInterface.dismiss();
- LOG.info("Choice: " + i);
- makeMapChanges(i);
- }
+ b.setTitle(R.string.mapview_extended_select_phenomena);
+ b.setItems(spinnerStrings.toArray(new String[0]), (dialogInterface, i) -> {
+ dialogInterface.dismiss();
+ LOG.info("Choice: " + i);
+ makeMapChanges(i);
});
b.show();