A power full resumable upload library for Android
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.araditc:Arad.android.resumableUploader:1.0.1'
}
Simple use cases will look something like this:
// initialize before use:
AppConfig.start(applicationContext);
AradUploader.newInstance().setBaseUrl(BASE_URL);
AradUploader.newInstance().setDownloadBaseUrl(BASE_DOWNLOAD_URL);
AradUploader.newInstance().upload(token, filePath, type, uploadId);
AradUploader.setProgressUploadListener(new UploadWorker.UploadResult() {
@Override
public void onUploadComplete(int i, MediaResponse mediaResponse) {
}
@Override
public void onUploadProgress(int index, int fileId, int total, int value, int percent) {
}
@Override
public void onErrorUploadProgress(int index, int fileId, int total, int value, int percent) {
}
@Override
public void onUploadFailed(String s) {
}
});
// unregister your call back
AradUploader.unRegisterProgressUploadListener();
Copyright 2020 Arad-Itc.
Licensed under the Arad License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.