Skip to content

Releases: cyface-de/android-utils

5.0.1

08 Dec 12:29

Choose a tag to compare

Changed:
- Remove unreliable write check for external files dir

5.0.0

08 Dec 10:40
862127b

Choose a tag to compare

  Added

  - StorageHelper utility class: New getStorageDirectoryWithFallback(context) and getStoragePathWithFallback(context) methods for robust storage selection with automatic fallback from external to internal storage
  - StorageType enum: EXTERNAL and INTERNAL values for identifying storage type
  - getStorageType(context): Query which storage type is currently being used (useful for UI display)

  Breaking Changes

  - DiskConsumption.spaceAvailable(): Now requires Context parameter
  - Constants.externalCyfaceFolderPath(): Removed - use StorageHelper.getStoragePathWithFallback(context) instead

  Changed

  - Storage selection now checks if directories are mounted AND writable
  - Automatically falls back to internal storage when external is unavailable
  - Avoids removable storage (SD cards, USB drives) for reliability
  - Added debug logging for storage location selection
  - Centralized storage detection logic to avoid code duplication

  Migration

  // Before
  val path = Constants.externalCyfaceFolderPath(context)
  DiskConsumption.spaceAvailable()

  // After
  val path = StorageHelper.getStoragePathWithFallback(context)
  DiskConsumption.spaceAvailable(context)

  // Display storage type in UI
  val storageType = StorageHelper.getStorageType(context)
  val label = when (storageType) {
      StorageHelper.StorageType.EXTERNAL -> "External Storage"
      StorageHelper.StorageType.INTERNAL -> "Internal Storage"
  }

4.2.2

14 Mar 10:57

Choose a tag to compare

Changed:
- Upgrade Kotlin plugin

4.2.1

14 Mar 10:48
b8fed03

Choose a tag to compare

Fixed:
- Make android compat and datastore a transitive api-dependency as they are used in API-classes

Changed:
- Upgrade dependencies and gradle wrapper
- Upgrade Java source compatiblilty to 21

4.2.0

19 Feb 11:04
5345310

Choose a tag to compare

Added:
- CodeQL workflow

Changed:
- Upgrade minSdk to 26 (Android 8)
- Convert Java to Kotlin
- Lint configuration
- Add Gradle Cache to all workflows

Fixed:
- Deprecations
- Action Warning: explicitly define permissions

4.1.0

14 Jan 06:17
fc1c11d

Choose a tag to compare

Changed:
- AppSettings need to be instantated via getInstance

4.0.9

08 Jan 07:06

Choose a tag to compare

Changed:
- Upgrade DataStore to 1.1.1

4.0.8

07 Jan 09:50

Choose a tag to compare

Changed:
- Upgrade dependencies

4.0.7

27 Feb 11:28
156edbc

Choose a tag to compare

Changed:
- Upgrade dependencies (Gradle 8, AGP 8, JDK 17, etc)

4.0.6

26 Feb 16:57

Choose a tag to compare

Changed:
- Upgrade dependencies