Easily upload files (Multipart/Binary/FTP out of the box) in the background with progress notification. Support for persistent upload requests, customizations and custom plugins.
Implemented passing explicit LifecycleOwner
in RequestObserver
. Previously, the LifecycleOwner
was got from the passed context.
Complete Kotlin rewrite of the whole library, with many breaking changes from 3.x.
Full details: https://github.com/gotev/android-upload-service/issues/450
Changelog:
Changelog:
This release addresses some Oreo-specific issues: https://github.com/gotev/android-upload-service/milestone/24?closed=1
Now using latest OkHttp 3.9.1. Refer to 3.4.1 milestone for details about bugfixes.
To be able to support Android O, Upload Service uses the latest support libraries 26.0.0
so if you are using support libraries < 26
in your app, make sure to remove any com.android.support:support-v4:25.+
or lower in your gradle file, otherwise you will get a NoSuchMethodException
at runtime.
Setting NAMESPACE
(as described in Setup) is now mandatory, to prevent misconfiguration which can lead to sensible data leakage fixed in #305 and #306. If you have not set the NAMESPACE
, you will get this exception at runtime:
java.lang.RuntimeException: Unable to start service net.gotev.uploadservice.UploadService@32340b1 with Intent { act=net.gotev.uploadservice.action.upload cmp=net.gotev.uploadservicedemo/net.gotev.uploadservice.UploadService (has extras) }: java.lang.IllegalArgumentException: Hey dude, please set the namespace for your app by following the setup instructions: https://github.com/gotev/android-upload-service/wiki/Setup
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3556)
at android.app.ActivityThread.-wrap20(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1698)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalArgumentException: Hey dude, please set the namespace for your app by following the setup instructions: https://github.com/gotev/android-upload-service/wiki/Setup
at net.gotev.uploadservice.UploadService.onStartCommand(UploadService.java:248)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3539)
at android.app.ActivityThread.-wrap20(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1698)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Minor release which solves #303
This release:
Check milestone 3.3 issues for more details
If you are migrating from 3.2.x, these are the breaking changes:
UploadNotificationConfig
has been completely redesigned, to allow more customization. See changes
onError
method has an additional parameter serverResponse
. See changes
onCompleted
callback gets called only if the server response code is >= 200 and < 400, so you have to handle both networking and server response errors in the onError
method now. Previous to 3.3, you had to handle networking errors in onError
and server response errors in onCompleted
Fixed OkHttp version to 3.8.0 and updated build tools to 25.0.2