From 8d9e3b6907e9f683809441624b6f31cf709a3012 Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Mon, 15 Oct 2018 20:41:33 -0500 Subject: [PATCH 1/3] Revert replacing Firebase with ACRA --- .gitignore | 1 - README.md | 4 ++-- app/acra.properties.sample | 3 +++ app/build.gradle | 16 ++++++++----- .../simplemarkdown/MarkdownApplication.java | 24 +++++++++++++++++++ .../simplemarkdown/model/MarkdownFile.java | 7 ++++++ .../presentation/MarkdownPresenterImpl.java | 6 ++++- .../view/activity/ExplorerActivity.java | 3 +++ .../view/activity/MainActivity.java | 3 +++ build.gradle | 2 -- 10 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 app/acra.properties.sample diff --git a/.gitignore b/.gitignore index aae4a5d..6bc1386 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,3 @@ app/samsung *~ *.log app/acra.properties -google-services.json diff --git a/README.md b/README.md index ee9c02b..30ee6f4 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ Using Android Studio is the preferred way to build the project. To build from th ./gradlew assembleDebug -### Firebase +### ACRA -SimpleMarkdown makes use of Firebase for crash reports. To integrate with your own project, create a project from the [Firebase Console](https://console.firebase.google.com/) and enable Crashlytics support. Download the `google-services.json` file and place it in the `app/` directory. Additionally, you'll need another `google-services.json` file enabled for the `app.package.name.samsung` version of the app, placed in the `app/src/samsung/` directory. +SimpleMarkdown makes use of [ACRA](https://github.com/ACRA/acra) for crash reports. This requires the presence of the `app/acra.properties` file for building. For your convenience, a `app/acra.properties.sample` file has been provided. ## Contributing diff --git a/app/acra.properties.sample b/app/acra.properties.sample new file mode 100644 index 0000000..bc9f4f5 --- /dev/null +++ b/app/acra.properties.sample @@ -0,0 +1,3 @@ +acraUrl=ACRA_URL +acraUser=ACRA_USER +acraPass=ACRA_PASS diff --git a/app/build.gradle b/app/build.gradle index 9c586d3..5eba941 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,5 +1,8 @@ apply plugin: 'com.android.application' +Properties acra = new Properties() +acra.load(new FileInputStream("app/acra.properties")) + android { configurations.all { resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1' @@ -24,6 +27,9 @@ android { versionCode 14 versionName "0.4.8" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + buildConfigField "String", "ACRA_URL", "\"${acra.getProperty("url")}\"" + buildConfigField "String", "ACRA_USER", "\"${acra.getProperty("user")}\"" + buildConfigField "String", "ACRA_PASS", "\"${acra.getProperty("pass")}\"" } buildTypes { release { @@ -50,7 +56,7 @@ android { } ext { - firebase_version = '16.1.0' + acraVersion = '5.1.3' support_version = "28.0.0" } @@ -83,10 +89,8 @@ dependencies { implementation 'com.jakewharton.rxbinding2:rxbinding-design:2.0.0' implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' implementation 'io.reactivex.rxjava2:rxjava:2.2.2' - implementation "com.google.firebase:firebase-core:16.0.3" - implementation "com.google.firebase:firebase-perf:$firebase_version" + + implementation "ch.acra:acra-http:$acraVersion" + samsungImplementation project(":IAP5Helper") } - -apply plugin: 'com.google.gms.google-services' -apply plugin: 'com.google.firebase.firebase-perf' diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java b/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java index 2cac106..0595fdd 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java @@ -1,7 +1,23 @@ package com.wbrawner.simplemarkdown; import android.app.Application; +import android.content.Context; +import org.acra.ACRA; +import org.acra.annotation.AcraCore; +import org.acra.annotation.AcraHttpSender; +import org.acra.data.StringFormat; +import org.acra.sender.HttpSender; + +import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_PASS; +import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_URL; +import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_USER; + +@AcraCore(buildConfigClass = BuildConfig.class, reportFormat = StringFormat.JSON) +@AcraHttpSender(uri = ACRA_URL, + basicAuthLogin = ACRA_USER, + basicAuthPassword = ACRA_PASS, + httpMethod = HttpSender.Method.POST) public class MarkdownApplication extends Application { private AppComponent component; @@ -17,4 +33,12 @@ public class MarkdownApplication extends Application { public AppComponent getComponent() { return component; } + + @Override + protected void attachBaseContext(Context base) { + super.attachBaseContext(base); + + // The following line triggers the initialization of ACRA + ACRA.init(this); + } } diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/model/MarkdownFile.java b/app/src/main/java/com/wbrawner/simplemarkdown/model/MarkdownFile.java index 87debf3..9c0c47e 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/model/MarkdownFile.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/model/MarkdownFile.java @@ -2,6 +2,8 @@ package com.wbrawner.simplemarkdown.model; import com.wbrawner.simplemarkdown.utility.Utils; +import org.acra.ACRA; + import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; @@ -110,6 +112,7 @@ public class MarkdownFile { this.content = sb.toString(); return true; } catch (IOException e) { + ACRA.getErrorReporter().handleException(e, false); return false; } finally { Utils.closeQuietly(reader); @@ -130,6 +133,7 @@ public class MarkdownFile { this.path = markdownFile.getParentFile().getAbsolutePath(); return load(new FileInputStream(markdownFile)); } catch (FileNotFoundException e) { + ACRA.getErrorReporter().handleException(e, false); return false; } } @@ -155,6 +159,7 @@ public class MarkdownFile { return false; } } catch (IOException e) { + ACRA.getErrorReporter().handleException(e, false); return false; } } @@ -170,12 +175,14 @@ public class MarkdownFile { ); writer.write(this.content); } catch (IOException e) { + ACRA.getErrorReporter().handleException(e, false); return false; } finally { if (writer != null) { try { writer.close(); } catch (IOException e) { + ACRA.getErrorReporter().handleException(e, false); // closing the reader failed } } diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/presentation/MarkdownPresenterImpl.java b/app/src/main/java/com/wbrawner/simplemarkdown/presentation/MarkdownPresenterImpl.java index 9c16e6a..6319739 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/presentation/MarkdownPresenterImpl.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/presentation/MarkdownPresenterImpl.java @@ -12,6 +12,8 @@ import com.wbrawner.simplemarkdown.utility.Utils; import com.wbrawner.simplemarkdown.view.MarkdownEditView; import com.wbrawner.simplemarkdown.view.MarkdownPreviewView; +import org.acra.ACRA; + import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; @@ -51,7 +53,8 @@ public class MarkdownPresenterImpl implements MarkdownPresenter { try { InputStream in = new FileInputStream(file); loadMarkdown(file.getName(), in); - } catch (FileNotFoundException ignored) { + } catch (FileNotFoundException e) { + ACRA.getErrorReporter().handleException(e, false); } } @@ -204,6 +207,7 @@ public class MarkdownPresenterImpl implements MarkdownPresenter { } loadMarkdown(fileName, in); } catch (Exception e) { + ACRA.getErrorReporter().handleException(e, false); if (editView != null) { editView.onFileLoaded(false); } diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java index c0e1cc6..59b2906 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java @@ -19,6 +19,8 @@ import com.wbrawner.simplemarkdown.R; import com.wbrawner.simplemarkdown.utility.Constants; import com.wbrawner.simplemarkdown.utility.Utils; +import org.acra.ACRA; + import java.io.File; import java.util.ArrayList; import java.util.HashMap; @@ -117,6 +119,7 @@ public class ExplorerActivity extends AppCompatActivity { try { sdcardSelected = filePath.get().contains(mounts[1].getAbsolutePath()); } catch (NullPointerException e) { + ACRA.getErrorReporter().handleException(e, false); updateListView(); menu.findItem(R.id.action_use_sdcard).setVisible(false); // TODO: Report this? diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/MainActivity.java b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/MainActivity.java index 8e69be7..7cb50ac 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/MainActivity.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/MainActivity.java @@ -24,6 +24,8 @@ import com.wbrawner.simplemarkdown.utility.Utils; import com.wbrawner.simplemarkdown.view.DisableableViewPager; import com.wbrawner.simplemarkdown.view.adapter.EditPagerAdapter; +import org.acra.ACRA; + import java.io.File; import java.io.InputStream; @@ -172,6 +174,7 @@ public class MainActivity extends AppCompatActivity } }); } catch (Exception e) { + ACRA.getErrorReporter().handleException(e, false); Toast.makeText(MainActivity.this, R.string.file_load_error, Toast.LENGTH_SHORT).show(); } } diff --git a/build.gradle b/build.gradle index 130b95c..1a292b3 100644 --- a/build.gradle +++ b/build.gradle @@ -9,8 +9,6 @@ buildscript { classpath 'com.android.tools.build:gradle:3.2.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files - classpath 'com.google.gms:google-services:4.0.1' - classpath 'com.google.firebase:firebase-plugins:1.1.5' } } From 352d033260125385f6f6dd11c23762848fa38fbb Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Mon, 15 Oct 2018 21:22:49 -0500 Subject: [PATCH 2/3] Add privacy policy and limit the data sent by ACRA --- app/src/main/assets/Privacy Policy.md | 118 +++++++++--------- .../simplemarkdown/MarkdownApplication.java | 45 ++++++- 2 files changed, 104 insertions(+), 59 deletions(-) diff --git a/app/src/main/assets/Privacy Policy.md b/app/src/main/assets/Privacy Policy.md index 24a5acd..c05498b 100644 --- a/app/src/main/assets/Privacy Policy.md +++ b/app/src/main/assets/Privacy Policy.md @@ -1,67 +1,69 @@ ## Privacy Policy -William Brawner built the Simple Markdown app as an Open Source app. This SERVICE is provided by William Brawner at no cost and is intended for use as is. +First and foremost, Simple Markdown DOES NOT collect any personally identifiable information. The +internet access permission is requested primarily for retrieving images from the internet in case +you embed them in your markdown, but it also allows me to send automated error and crash reports +to myself whenever the app runs into an issue. These error reports are powered by [ACRA](https://github.com/ACRA/acra), which is +an open source error reporting solution, and are sent to a private server that only I have access +to. These error reports are used exclusively for fixing problems that occur while you're using the +app, and contain only the bare minimum information that I need to be able to resolve the issue. The +information sent may include: -This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. +- the version of Android your device is running (e.g. 7.1) +- details about the version of SimpleMarkdown that you are using (Google Play version, Samsung Galaxy Apps version, FDroid version, version number, etc) +- any logs that SimpleMarkdown (but not other apps) might have created during execution +- the app identifier (com.wbrawner.simplemarkdown) +- your device's manufacturer (Samsung, Huawei, LG, etc) +- your device's model (Galaxy S8, Mate 10 pro, G7, etc) +- your device's configuration at app start and at the moment of the crash (the configuration tells me things like if you had the keyboard open, and if you were using the app in landscape or portrait mode. See the end of this privacy policy for a sample of that this might look like.) +- an estimation of the amount of available memory your device has (7353192448) +- an estimation of the amount of total memory your device has (55540875264) +- a stacktrace of the error (a stacktrace tells me which part of my code caused the error, what kind of error it was, and which parts of the code ran up to that error. See the end of this privacy policy for a sample of what this might look like.) +- any custom settings you have set within SimpleMarkdown (your default launch screen, default file directory, etc. Note that this does NOT include settings specific to your device, like whether or not you have WiFi enabled for example) +- details about which thread the crash occurred on (e.g. main, file handling, network) +- the time and date you started the app +- the time and date the crash occurred -If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. +This information is the only information that I collect, and it's strictly used for finding and fixing issues in the code as quickly as possible. If you don't feel comfortable with this however, you are able to opt-out from the settings menu. Should you choose to opt-out of automated crash reports, I would very much appreciate it if you could contact me when you run into an issue either by email: [support@wbrawner.com](mailto:support@wbrawner.com) or by submitting an issue via the [GitHub page](https://github.com/wbrawner/SimpleMarkdown). -The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Simple Markdown unless otherwise defined in this Privacy Policy. +### Sample data -**Information Collection and Use** +A sample configuration: -For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way. +``` +locale=fr_FR +hardKeyboardHidden=HARDKEYBOARDHIDDEN_YES +keyboard=KEYBOARD_NOKEYS +keyboardHidden=KEYBOARDHIDDEN_NO +fontScale=1.0 +mcc=208 +mnc=10 +navigation=NAVIGATION_TRACKBALL +navigationHidden=NAVIGATIONHIDDEN_NO +orientation=ORIENTATION_PORTRAIT +screenLayout=SCREENLAYOUT_SIZE_NORMAL+SCREENLAYOUT_LONG_YES +seq=117 +touchscreen=TOUCHSCREEN_FINGER +uiMode=UI_MODE_TYPE_NORMAL+UI_MODE_NIGHT_NO +userSetLocale=false +``` -The app does use third party services that may collect information used to identify you. +A sample stacktrace: -Link to privacy policy of third party service providers used by the app - -* [Google Play Services](https://www.google.com/policies/privacy/) -* [Firebase](https://firebase.google.com/support/privacy/) - * Analytics - * Crashlytics - * Performance - - -**Log Data** - -I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics. - -**Cookies** - -Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory. - -This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service. - -**Service Providers** - -I may employ third-party companies and individuals due to the following reasons: - -* To facilitate our Service; -* To provide the Service on our behalf; -* To perform Service-related services; or -* To assist us in analyzing how our Service is used. - -I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose. - -**Security** - -I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security. - -**Links to Other Sites** - -This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services. - -**Children’s Privacy** - -These Services do not address anyone under the age of 13\. I do not knowingly collect personally identifiable information from children under 13\. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions. - -**Changes to This Privacy Policy** - -I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page. - -**Contact Us** - -If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me. - -This privacy policy page was created at [privacypolicytemplate.net](https://privacypolicytemplate.net) and modified/generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.firebaseapp.com/) \ No newline at end of file +``` +java.io.IOException: No such file or directory + at java.io.UnixFileSystem.createFileExclusively0(UnixFileSystem.java) + at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:280) + at java.io.File.createNewFile(File.java:948) + at com.wbrawner.simplemarkdown.model.MarkdownFile.save(MarkdownFile.java:152) + at com.wbrawner.simplemarkdown.presentation.MarkdownPresenterImpl.saveMarkdown(MarkdownPresenterImpl.java:120) + at com.wbrawner.simplemarkdown.presentation.MarkdownPresenterImpl.lambda$saveMarkdown$2$MarkdownPresenterImpl(MarkdownPresenterImpl.java:120) + at com.wbrawner.simplemarkdown.presentation.MarkdownPresenterImpl$$Lambda$2.run(MarkdownPresenterImpl.java) + at android.os.Handler.handleCallback(Handler.java:751) + at android.os.Handler.dispatchMessage(Handler.java:95) + at android.os.Looper.loop(Looper.java:154) + at android.app.ActivityThread.main(ActivityThread.java:6121) + at java.lang.reflect.Method.invoke(Method.java) + at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) + at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779) +``` diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java b/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java index 0595fdd..f20e7c7 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java @@ -12,8 +12,51 @@ import org.acra.sender.HttpSender; import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_PASS; import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_URL; import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_USER; +import static org.acra.ReportField.ANDROID_VERSION; +import static org.acra.ReportField.APPLICATION_LOG; +import static org.acra.ReportField.APP_VERSION_CODE; +import static org.acra.ReportField.APP_VERSION_NAME; +import static org.acra.ReportField.AVAILABLE_MEM_SIZE; +import static org.acra.ReportField.BRAND; +import static org.acra.ReportField.BUILD_CONFIG; +import static org.acra.ReportField.CRASH_CONFIGURATION; +import static org.acra.ReportField.CUSTOM_DATA; +import static org.acra.ReportField.INITIAL_CONFIGURATION; +import static org.acra.ReportField.PACKAGE_NAME; +import static org.acra.ReportField.PHONE_MODEL; +import static org.acra.ReportField.SHARED_PREFERENCES; +import static org.acra.ReportField.STACK_TRACE; +import static org.acra.ReportField.STACK_TRACE_HASH; +import static org.acra.ReportField.THREAD_DETAILS; +import static org.acra.ReportField.TOTAL_MEM_SIZE; +import static org.acra.ReportField.USER_APP_START_DATE; +import static org.acra.ReportField.USER_CRASH_DATE; -@AcraCore(buildConfigClass = BuildConfig.class, reportFormat = StringFormat.JSON) +@AcraCore( + buildConfigClass = BuildConfig.class, + reportContent = { + ANDROID_VERSION, + APP_VERSION_CODE, + APP_VERSION_NAME, + APPLICATION_LOG, + AVAILABLE_MEM_SIZE, + BRAND, + BUILD_CONFIG, + CRASH_CONFIGURATION, + CUSTOM_DATA, // Not currently used, but might be useful in the future + INITIAL_CONFIGURATION, + PACKAGE_NAME, + PHONE_MODEL, + SHARED_PREFERENCES, + STACK_TRACE, + STACK_TRACE_HASH, + THREAD_DETAILS, + TOTAL_MEM_SIZE, + USER_APP_START_DATE, + USER_CRASH_DATE, + }, + reportFormat = StringFormat.JSON +) @AcraHttpSender(uri = ACRA_URL, basicAuthLogin = ACRA_USER, basicAuthPassword = ACRA_PASS, From 0a4c7bb29acf0fec0dbe2c24731b1b1d3fd8a72b Mon Sep 17 00:00:00 2001 From: Billy Brawner Date: Tue, 16 Oct 2018 07:25:28 -0500 Subject: [PATCH 3/3] Fix error reports and allow disabling them --- app/acra.properties.sample | 6 +++--- app/src/main/assets/Privacy Policy.md | 18 +++++------------- .../simplemarkdown/MarkdownApplication.java | 2 -- .../view/activity/ExplorerActivity.java | 6 ------ app/src/main/res/values/strings.xml | 6 ++++++ app/src/main/res/xml/pref_general.xml | 9 ++++++++- 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/app/acra.properties.sample b/app/acra.properties.sample index bc9f4f5..c0c912f 100644 --- a/app/acra.properties.sample +++ b/app/acra.properties.sample @@ -1,3 +1,3 @@ -acraUrl=ACRA_URL -acraUser=ACRA_USER -acraPass=ACRA_PASS +url=ACRA_URL +user=ACRA_USER +pass=ACRA_PASS diff --git a/app/src/main/assets/Privacy Policy.md b/app/src/main/assets/Privacy Policy.md index c05498b..1d0806e 100644 --- a/app/src/main/assets/Privacy Policy.md +++ b/app/src/main/assets/Privacy Policy.md @@ -1,30 +1,22 @@ ## Privacy Policy -First and foremost, Simple Markdown DOES NOT collect any personally identifiable information. The -internet access permission is requested primarily for retrieving images from the internet in case -you embed them in your markdown, but it also allows me to send automated error and crash reports -to myself whenever the app runs into an issue. These error reports are powered by [ACRA](https://github.com/ACRA/acra), which is -an open source error reporting solution, and are sent to a private server that only I have access -to. These error reports are used exclusively for fixing problems that occur while you're using the -app, and contain only the bare minimum information that I need to be able to resolve the issue. The -information sent may include: +First and foremost, Simple Markdown DOES NOT collect any personally identifiable information. The internet access permission is requested primarily for retrieving images from the internet in case you embed them in your markdown, but it also allows me to send automated error and crash reports to myself whenever the app runs into an issue. These error reports are powered by [ACRA](https://github.com/ACRA/acra), which is an open source error reporting solution, and are sent to a private server that only I have access to. These error reports are used exclusively for fixing problems that occur while you're using the app, and contain only the bare minimum information that I need to be able to resolve the issue. The information sent may include the following: - the version of Android your device is running (e.g. 7.1) - details about the version of SimpleMarkdown that you are using (Google Play version, Samsung Galaxy Apps version, FDroid version, version number, etc) -- any logs that SimpleMarkdown (but not other apps) might have created during execution - the app identifier (com.wbrawner.simplemarkdown) - your device's manufacturer (Samsung, Huawei, LG, etc) - your device's model (Galaxy S8, Mate 10 pro, G7, etc) -- your device's configuration at app start and at the moment of the crash (the configuration tells me things like if you had the keyboard open, and if you were using the app in landscape or portrait mode. See the end of this privacy policy for a sample of that this might look like.) +- your device's configuration at app start and at the moment of the error (the configuration tells me things like if you had the keyboard open, and if you were using the app in landscape or portrait mode. See the end of this privacy policy for a sample of that this might look like.) - an estimation of the amount of available memory your device has (7353192448) - an estimation of the amount of total memory your device has (55540875264) - a stacktrace of the error (a stacktrace tells me which part of my code caused the error, what kind of error it was, and which parts of the code ran up to that error. See the end of this privacy policy for a sample of what this might look like.) - any custom settings you have set within SimpleMarkdown (your default launch screen, default file directory, etc. Note that this does NOT include settings specific to your device, like whether or not you have WiFi enabled for example) -- details about which thread the crash occurred on (e.g. main, file handling, network) +- details about which thread the error occurred on (e.g. main, file handling, network) - the time and date you started the app -- the time and date the crash occurred +- the time and date the error occurred -This information is the only information that I collect, and it's strictly used for finding and fixing issues in the code as quickly as possible. If you don't feel comfortable with this however, you are able to opt-out from the settings menu. Should you choose to opt-out of automated crash reports, I would very much appreciate it if you could contact me when you run into an issue either by email: [support@wbrawner.com](mailto:support@wbrawner.com) or by submitting an issue via the [GitHub page](https://github.com/wbrawner/SimpleMarkdown). +This information is the only information that I collect, and it's strictly used for finding and fixing issues in the code as quickly as possible. If you don't feel comfortable with this however, you are able to opt-out from the settings menu. Should you choose to opt-out of automated error reports, I would very much appreciate it if you could contact me when you run into an issue either by email: [support@wbrawner.com](mailto:support@wbrawner.com) or by submitting an issue via the [GitHub page](https://github.com/wbrawner/SimpleMarkdown). ### Sample data diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java b/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java index f20e7c7..4152d1e 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/MarkdownApplication.java @@ -13,7 +13,6 @@ import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_PASS; import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_URL; import static com.wbrawner.simplemarkdown.BuildConfig.ACRA_USER; import static org.acra.ReportField.ANDROID_VERSION; -import static org.acra.ReportField.APPLICATION_LOG; import static org.acra.ReportField.APP_VERSION_CODE; import static org.acra.ReportField.APP_VERSION_NAME; import static org.acra.ReportField.AVAILABLE_MEM_SIZE; @@ -38,7 +37,6 @@ import static org.acra.ReportField.USER_CRASH_DATE; ANDROID_VERSION, APP_VERSION_CODE, APP_VERSION_NAME, - APPLICATION_LOG, AVAILABLE_MEM_SIZE, BRAND, BUILD_CONFIG, diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java index 59b2906..1cafa80 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java +++ b/app/src/main/java/com/wbrawner/simplemarkdown/view/activity/ExplorerActivity.java @@ -122,12 +122,6 @@ public class ExplorerActivity extends AppCompatActivity { ACRA.getErrorReporter().handleException(e, false); updateListView(); menu.findItem(R.id.action_use_sdcard).setVisible(false); - // TODO: Report this? -// Crashlytics.logException(e); -// Crashlytics.log(mounts.length + " mounts found"); -// for (File mount : mounts) { -// Crashlytics.log(mount.getAbsolutePath()); -// } } if (sdcardSelected) { menu.findItem(R.id.action_use_sdcard).setChecked(true); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 016c2e0..fba16cc 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -42,6 +42,12 @@ Select \u2191 Go up Privacy + acra.enable + Enable automated error reports + Error reports will not be sent + Error reports will be sent + Files will automatically save + Files will not be automatically saved @string/value_edit_view @string/value_explorer_view diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml index 0a3ff1c..a51d022 100644 --- a/app/src/main/res/xml/pref_general.xml +++ b/app/src/main/res/xml/pref_general.xml @@ -3,7 +3,8 @@ +