The upload flow in Kotlin with plain XML views.
- Put your
fastpix.tokenandfastpix.secretKeyin the project-rootlocal.properties(see ../README.md). - Open the project in Android Studio, select the
kotlin-xmlmodule, and Run. - Pick a file, tap Start, then use Pause / Resume / Abort. Send the app to the background and the upload keeps going, with progress in a notification.
MainActivity.kt— the screen; gets a signed URL, hands off toUploadManager, and observes its state.UploadManager.kt— holds the running upload and exposes its state as aStateFlow.UploadService.kt— foreground service that keeps the upload alive in the background.OkHttpHelper.kt— the "create upload" API call.Config.kt— credentials and chunk size.
See ../README.md for how the background upload works.