No description
Find a file
Andy Scherzinger 5dd23905bb
Merge pull request #1948 from nextcloud/renovate/github-codeql-action-4.x
chore(deps): update github/codeql-action action to v4.32.2
2026-02-05 21:48:07 +01:00
.github/workflows chore(deps): update github/codeql-action action to v4.32.2 2026-02-05 20:26:35 +00:00
.idea Client integration 2026-01-12 09:34:23 +01:00
.tx add transifex support 2024-11-14 09:29:37 +01:00
gradle fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.10.0 2026-02-04 08:06:52 +00:00
library fix(l10n): Update translations from Transifex 2026-02-05 03:11:10 +00:00
LICENSES 🔄 synced local '.github/workflows/' with remote 'config/workflows/' 2024-03-09 13:16:09 +01:00
sample_client chore(deps): update gradle to v9.3.1 2026-01-29 16:32:34 +00:00
scripts ci(chksm): Add meta-data 2025-06-10 12:13:04 +02:00
.codecov.yml Use SPDX headers 2024-02-29 19:31:52 +01:00
.drone.yml https://packages.sury.org/php/ not signed correctly, but also not needed 2026-02-05 07:42:13 +01:00
.editorconfig Use SPDX headers 2024-02-29 19:31:52 +01:00
.gitignore Use SPDX headers 2024-02-29 19:31:52 +01:00
.pullapprove.yml Use SPDX headers 2024-02-29 19:31:52 +01:00
build.gradle fix(deps): update kotlin monorepo to v2.3.0 2025-12-16 12:38:32 +00:00
gradle.properties Bump to Gradle 9 2026-01-16 09:44:45 +01:00
gradlew chore(deps): update gradle to v9.1.0 2025-09-18 16:42:03 +00:00
gradlew.bat chore(deps): update gradle to v9.1.0 2025-09-18 16:42:03 +00:00
gradlew.bat.license Add SPDX header files 2024-03-23 11:12:21 +01:00
gradlew.license Add SPDX header files 2024-03-23 11:12:21 +01:00
jacoco.gradle Use SPDX headers 2024-02-29 19:31:52 +01:00
jitpack.yml Use SPDX headers 2024-02-29 19:31:52 +01:00
LICENSE.md Use SPDX headers 2024-02-29 19:31:52 +01:00
README.md MinSDK 21 2025-07-23 08:41:34 +02:00
renovate.json5 Ignore jackrabbit-webdav updates 2026-01-20 15:36:01 +01:00
REUSE.toml docs(reuse): Add translations 2024-11-14 16:24:58 +01:00
settings.gradle Use SPDX headers 2024-02-29 19:31:52 +01:00
THIRD_PARTY.txt Use SPDX headers 2024-02-29 19:31:52 +01:00

Nextcloud Android Library v2 Build Status REUSE status Codacy Badge

Introduction

Using Nextcloud Android library it will be the easiest way to communicate with Nextcloud servers. Add this library in your project and integrate your application with Nextcloud seamlessly.

Android Library v2

Starting from 01.10.2019 we will not actively develop our old library (v1), but maintain it until 01.10.2021 with bug fixes. v2 is using OkHTTP and DAV4jvm by BitfireAT. Needed changes for projects using this library are:

  • change build.gradle
    • add to android
      {}: compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
    
    • add to dependencies {…}:
       implementation "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
    

Use Library

In the repository it is not only the library project but also the example project "sample_client"; thanks to it you will learn how to use the library.

There are different ways of adding this library to your code

Gradle / Maven dependency

At the moment we do not have a publishing mechanism to a maven repository so the easiest way to add the library to your app is via a JitPack Dependency

build via Groovy configuration

repositories {
    ...
    maven { url "https://jitpack.io" }
}
dependencies {
    ...
    implementation("com.github.nextcloud:android-library:$androidLibraryVersion") {
        exclude group: 'org.ogce', module: 'xpp3' // unused in Android and brings wrong Junit version
    }

build via Kotlin configuration

in settings.gradle.kts

dependencyResolutionManagement {
    ...
    repositories {
    ...
        maven(url = "https://jitpack.io")
    }
}

in build.gradle.kts

dependencies {
    ...
    implementation("com.github.nextcloud:android-library:$androidLibraryVersion") {
        exclude(group = "org.ogce", module = "xpp3") // unused in Android and brings wrong Junit version
    }

As a git submodule

Basically get this code and compile it having it integrated via a git submodule:

  1. go into your own apps directory on the command line and add this lib as a submodule: git submodule add https://github.com/nextcloud/android-library nextcloud-android-library
  2. Import/Open your app in Android Studio

Branching strategy

The repository holds one main branch with an infinite lifetime:

  • master

Branch origin/master is considered the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release.

Other branches, some supporting branches are used to aid parallel development between team members, ease tracking of features and to assist in quickly fixing live production problems. Unlike the main branch, these branches always have a limited life time, since they will be removed eventually (feature branching).

Development process

We are all about quality while not sacrificing speed so we use a very pragmatic workflow.

  • create an issue with feature request
    • discuss it with other developers
    • create mockup if necessary
    • must be approved --> label approved
    • after that no conceptual changes!
  • develop code
  • create pull request
  • to assure the quality of the app, any PR gets reviewed, approved and tested by two developers before it will be merged to master

License

Nextcloud Android Library is available under MIT license. See LICENSE.md with the full license text.

Third party libraries

Nextcloud Android Library uses Apache JackRabbit, version 2.12.4. 
Copyright (C) 2004-2010 The Apache Software Foundation. 
Licensed under Apache License, Version 2.0.
Apache JackRabbit depends on Commons HTTPClient version 3.1 and SLF4j version 1.7.5; both included also. 
Copyright (C) 2004-2010 The Apache Software Foundation. 
Licensed under Apache License, Version 2.0.

Compatibility

Nextcloud Android library is valid for Android version 5.0 and up (with android:minSdkVersion="21" and android:targetSdkVersion="35").

Nextcloud Android library supports Nextcloud server from version 9+.

When using newer libraries in your application that integrates with the Nextcloud Android library you could hit a conflict issue with the logging libraries used by our (outdated) HTTPClient. In order to mitigate the issues, please add the following in your build.gradle for the time being:

configurations.all {
    exclude group: "org.slf4j", module: "slf4j-log4j12"
    exclude group: "log4j", module: "log4j"
}