background_runtime_android 0.1.1 copy "background_runtime_android: ^0.1.1" to clipboard
background_runtime_android: ^0.1.1 copied to clipboard

PlatformAndroid

Android implementation of the background_runtime plugin.

background_runtime_android #

Android implementation of the background_runtime Flutter plugin.

Uses Kotlin coroutines, Foreground Service, Media3 ExoPlayer, OkHttp, and SQLite.

Supports Android API 24+.

Capabilities #

  • Downloads: OkHttp async downloads with resume support (Range: header + FileOutputStream append). Progress callbacks via EventChannel.
  • Audio playback: Media3 ExoPlayer with MediaSession for lock screen controls. Album art downloaded and cached as Bitmap, dominant color extracted from 3×3 pixel grid.
  • Notifications: Foreground Service notification with 4 action buttons (Previous, Play/Pause, Next, Stop). Album art as setLargeIcon(), colorized via setColor() (API 31+).
  • Notification actions: NotificationAction enum values sent to Dart via notificationActionEvents EventChannel. Handler-based main-thread dispatch.
  • Persistence: Room database (downloads, audio tracks, config). Auto-resume on initialize.