Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9fe1b079 authored by Stefan Niedermann's avatar Stefan Niedermann
Browse files

Merge branch 'master' into 916-settings

# Conflicts:
#	app/src/main/java/it/niedermann/owncloud/notes/persistence/NotesRepository.java
#	app/src/main/java/it/niedermann/owncloud/notes/shared/model/ApiVersion.java
#	app/src/main/res/values/strings.xml
parents 0d1136aa 7c5cb1b2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -12,6 +12,15 @@ jobs:
      - name: Validate Gradle Wrapper
        uses: gradle/wrapper-validation-action@v1

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Lint
        run: bash ./gradlew lintDebug --stacktrace

  test:
    name: Unit tests
    runs-on: ubuntu-latest
+34 −6
Original line number Diff line number Diff line
@@ -27,17 +27,45 @@ Sorry. There are so many different environments, that it is impossible for us to

First of all make sure you have updated to and tried with the latest available versions of both, this app and the [Notes server app](https://apps.nextcloud.com/apps/notes).

In case you receive a `NextcloudApiNotRespondingException`, try to disable the battery optimization for both apps.
In all other cases please try to clear the storage of **both** apps, Nextcloud Android **and** Nextcloud Notes Android.
### `NextcloudApiNotRespondingException`

Try to disable the battery "optimization" for both apps. Some manufacturers prevent the app from communicating with the Nextcloud Android properly.
This is a [known issue of the SingleSignOn mechanism](https://github.com/nextcloud/Android-SingleSignOn#troubleshooting) which we only can work around but not solve on our side.

### `UnknownErrorException: Read timed out`

This issue is caused by a connection time out. This can be the case if there are infrastructural or environmental problems (like a misconfigured server or a bad network connection).
Probably you will experience it when importing an account, because at this moment, all your Notes will getting downloaded at once. Given you have a lots of notes, this might take longer than the connection is available.
Further synchronizations are usually not causing this issue, because the Notes app tries to synchronize only *changed* notes after the first import.
If your notes are not ten thousands of characters long, it is very unlikely that this causes a connection timeout.

We plan to improve the import of an account and make it more reliable by [fetching notes step by step](https://github.com/stefan-niedermann/nextcloud-notes/issues/761#issuecomment-836989421) in a future release.
Until then you can as a workaround for the first import try to
1. move all your notes to a different folder on your Nextcloud instance
2. import your account on your smartphone
3. put your notes back to the original folder step by step and sync everytime you put some notes back 

### `NextcloudFilesAppAccountNotFoundException`

We are not yet sure what exactly causes this issue, but investigate it by [adding more debug logs to recent versions](https://github.com/stefan-niedermann/nextcloud-notes/issues/1256#issuecomment-859505153). In theory this might happen if an already imported account has been deleted in the Nextcloud app.
As a workaround you can remove the account (or clear the storage of the app as described below if you can't access the account manager anymore) and import it again.

### `TokenMismatchException` and all others

In all other cases please try to clear the storage of **both** apps, Nextcloud Android **and** Nextcloud Notes Android. Not yet synchronized changes will be lost by performing this step.

You can achieve this by navigating to

```
Android settings
 ↳ Apps
   ↳ Nextcloud / Notes
     ↳ Storage
       ↳ Clear storage

     Apps

Nextcloud / Notes

    Storage

 Clear storage
```

Then set up your account in the Nextcloud Android app again and import the configured account in the Nextcloud Notes Android app.
+1 −2
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/)

## :eyes: Screenshots

| List View | Edit Mode | Preview |
| _ | _ | _ |
| :--: | :--: | :--: |
| ![Screenshot of list view](/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png) | ![Screenshot of edit mode](/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png) | ![Screenshot of preview](/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png) |

@@ -47,7 +47,6 @@ An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/)

## :checkered_flag: Planned features
  * Local accounts ([#615](https://github.com/stefan-niedermann/nextcloud-notes/issues/615))
  * Trashbin ([#238](https://github.com/stefan-niedermann/nextcloud-notes/issues/238))

## :family: Join the team
  * Test the app with different devices
+23 −25
Original line number Diff line number Diff line
@@ -5,17 +5,15 @@ android {
    buildToolsVersion '30.0.3'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
        coreLibraryDesugaringEnabled true
    }

    defaultConfig {
        applicationId "it.niedermann.owncloud.notes"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 3004001
        versionName "3.4.1"
        targetSdkVersion 30
        versionCode 3004010
        versionName "3.4.10"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        javaCompileOptions {
            annotationProcessorOptions {
@@ -71,51 +69,51 @@ android {
}

dependencies {
    // Markdown
    implementation project(path: ':markdown')

    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

    // Nextcloud SSO
    implementation "com.github.nextcloud:Android-SingleSignOn:0.5.6"
    implementation 'com.github.stefan-niedermann.nextcloud-commons:sso-glide:1.2.5'
    implementation 'com.github.stefan-niedermann.nextcloud-commons:exception:1.2.5'
    implementation 'com.github.nextcloud:Android-SingleSignOn:0.5.6'
    implementation 'com.github.stefan-niedermann.nextcloud-commons:sso-glide:1.4.0'
    implementation 'com.github.stefan-niedermann.nextcloud-commons:exception:1.4.0'
    implementation 'com.github.stefan-niedermann:android-commons:0.2.0'

    // Glide
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'

    // Markdown
    implementation project(path: ':markdown')

    // Android X
    implementation "androidx.appcompat:appcompat:1.2.0"
    implementation "androidx.fragment:fragment:1.3.3"
    implementation "androidx.preference:preference:1.1.1"
    implementation "androidx.recyclerview:recyclerview:1.2.0"
    implementation 'androidx.appcompat:appcompat:1.3.0'
    implementation 'androidx.fragment:fragment:1.3.5'
    implementation 'androidx.preference:preference:1.1.1'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'
    implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
    implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
    implementation 'androidx.work:work-runtime:2.5.0'
    implementation "com.google.android.material:material:1.3.0"
    implementation 'com.google.android.material:material:1.3.0'

    // Database
    implementation "androidx.room:room-runtime:2.3.0"
    annotationProcessor "androidx.room:room-compiler:2.3.0"
    implementation 'androidx.room:room-runtime:2.3.0'
    annotationProcessor 'androidx.room:room-compiler:2.3.0'

    // Retrofit
    //noinspection GradleDependency
    implementation 'com.squareup.retrofit2:retrofit:2.6.4'

    // Gson
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.google.code.gson:gson:2.8.7'

    // ReactiveX
    implementation 'io.reactivex.rxjava2:rxjava:2.2.21'

    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

    // Testing
    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.mockito:mockito-core:3.9.0'
    testImplementation 'org.robolectric:robolectric:4.5.1'
    testImplementation 'androidx.test:core:1.3.0'
    testImplementation 'androidx.test.ext:junit:1.1.2'
    testImplementation 'androidx.arch.core:core-testing:2.1.0'
    testImplementation 'junit:junit:4.13.2'
    testImplementation 'org.mockito:mockito-core:3.11.2'
    testImplementation 'org.robolectric:robolectric:4.5.1'

    implementation fileTree(dir: 'libs', include: ['*.jar'])
}
+5 −1
Original line number Diff line number Diff line
@@ -6,6 +6,11 @@
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <queries>
        <package android:name="com.nextcloud.client" />
        <package android:name="com.nextcloud.android.beta" />
    </queries>

    <application
        android:name=".NotesApplication"
        android:allowBackup="true"
@@ -13,7 +18,6 @@
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name_long"
        android:networkSecurityConfig="@xml/network_security_config"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:targetApi="n">
Loading