Giter VIP home page Giter VIP logo

gotev / android-upload-service Goto Github PK

View Code? Open in Web Editor NEW
2.8K 101.0 688.0 15.87 MB

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.

License: Apache License 2.0

Shell 0.71% Kotlin 99.29%
upload service http android ftp binary background notification persistent persistent-data plugins https ssl multipart-uploads multipart-formdata multipart

android-upload-service's Introduction


10 years! Since 2013

Android Arsenal ktlint Maven Central PRs Welcome

ℹ️ Get started
📖 Check the Wiki to learn how to use the library and get help
👉 Try it out in action, Get the demo APK
💥 Not working? Keep calm and follow the troubleshooting procedure
🎁 Find this library useful? Consider sponsoring its development by pressing the Sponsor button on the top right of this page.
Still using 3.x ? It's not maintained or supported. You may have security issues and problems with newer Androids. Switch to 4.x
❤️ Contributing
🌟 Features
🙋 Who is using Upload Service
📣 Credits
📜 License

Screencasts from the example app included in this repository:

compose-upload upload

At the core of the library there is a Service which handles multiple concurrent upload tasks in the background. It publishes broadcast intents to notify status. This way the logic is completely decoupled from the UI. You are safe launching upload requests from your fragments, activities and services without worrying about locking the thread in which you are. Check the wiki to learn how you can use it in your App.

You are also safe if your app is put in the background. All the uploads will continue to be executed also when your device is idle.

Bear in mind that if you kill your app, the service gets killed as well, as it's attached to your app's process and all the currently running uploads will be terminated abruptly.

Features

  • Android 5.0 (API 21) to Android 14 (API 34) support.
    • Android 13 Note, for apps targeting API 33 or newer:
    • Android 12 Note, for apps targeting API 31 or newer:
      • What's supported: uploads initiated while the app is in foreground, with progress indication notification
      • What's NOT supported: uploads started while the app is in the background or uploads without progress indication notification. This is due to the Service limitations imposed by Google, which requires all background services to display a notification to the user. Current architecture cannot support this. For support of those use-cases, WorkManager is the only option.
  • 100% Kotlin and fully interoperable with Java
  • upload files to a server with FTP, HTTP multipart/form-data or Binary data requests
  • upload requests can be serialized and executed later
  • handle multiple concurrent uploads in the background, even if the device is idle (Doze mode)
  • automatically retry failed uploads, with a configurable exponential backoff
  • possiblity implement other upload protocols as plugins
  • possibility to automatically delete uploaded files when the upload is successful
  • show status in the Android Notification Center.
  • change the underlying HTTP stack. Currently HttpURLConnection (the default) and OkHttp are supported. You can also implement your own.
  • set library log level and provide custom logger implementation
  • easily customize the notification with text, icons and actions for the different states
  • Possibility to implement your own notification handler
  • Lifecycle-Aware RequestObserver to monitor your uploads

Powered by Android Upload Service

Apps and libraries powered by this library. To be included in the following list, simply create an issue and provide the app name and a link.

Credits

Created my free logo at LogoMakr.com

License

Copyright (C) 2013-2023 Aleksandar Gotev

Licensed under the Apache 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

   http://www.apache.org/licenses/LICENSE-2.0

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.

android-upload-service's People

Contributors

akiller avatar alexbbb avatar alexkok avatar automatic1111 avatar baptistejamin avatar dependabot-preview[bot] avatar dependabot[bot] avatar exuvo avatar felixdivo avatar gotev avatar hendrawd avatar ilic avatar keiferstone avatar mabdurrahman avatar markadamson avatar mikepenz avatar mrblrrd avatar mvasquezb avatar nikitachicherin avatar panayotcankov avatar phillab avatar stephentuso avatar xoibrandon avatar youngjaekim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-upload-service's Issues

Implicit intents with startService are not safe: Intent

How i can solve this

Intent { act=com.alexbbb.uploadservice.action.upload (has extras) } android.content.ContextWrapper.startService:501 com.alexbbb.uploadservice.UploadService.startUpload:93 com.alexbbb.uploadservice.demo.MainActivity.onUploadButtonClick:248

EPIPE (Broken pipe): exception in UploadService.uploadFiles(UploadService.java:290)

Hello Alex,
I'm trying to upload file to my server and i get an exception:

Error in upload with ID: 7a31894d-342e-4bfc-99be-4bbf4c0ae0c8. sendto failed: EPIPE (Broken pipe): java.net.SocketException: sendto failed: EPIPE (Broken pipe)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:546)
at libcore.io.IoBridge.sendto(IoBridge.java:515)
at java.net.PlainSocketImpl.write(PlainSocketImpl.java:504)
at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:37)
at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:266)
at com.android.okio.Okio$1.write(Okio.java:70)
at com.android.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:116)
at com.android.okio.RealBufferedSink.write(RealBufferedSink.java:44)
at com.android.okhttp.internal.http.HttpConnection$ChunkedSink.write(HttpConnection.java:334)
at com.android.okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:116)
at com.android.okio.RealBufferedSink$1.write(RealBufferedSink.java:131)
at com.alexbbb.uploadservice.UploadService.uploadFiles(UploadService.java:290)
at com.alexbbb.uploadservice.UploadService.handleFileUpload(UploadService.java:163)
at com.alexbbb.uploadservice.UploadService.onHandleIntent(UploadService.java:133)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)

download

I have copied some classes and reversed them to add downloading capabilities to the library, should I create a branch and request merge?
Or do you think it's not worth merging into this library?

How to get JSON response

Hi, can you help me, please.
How to get json response from UploadService at onCompleted() method?

Unlimited retries

Can I choose to make the service retry until it sends the data successfully?
Does it provide listeners for connectivity so as it would try to send the request when internet is available?

How to pass ByteArrayBody?

Hello Alex,

I am uploading a Video to server as file, my need is to upload the thumbnail image of that video. So how can i do this in your library.
My server end developer need ByteArrayBody, so please tell me how to pass ByteArrayBody?

Update examples & docs

Update example app project by adding:

  • option to enable and disable ringtone for the upload task
  • binary file upload capability

Add server-side demo implementations which supports binary file upload.
Update README.md examples for multipart upload and binary upload.

Use in a Service instead of Activity

Hi,

I'm trying to use this library from within an Android Service. The AbstractUploadServiceReceiver.register requires Activity as parameter. Compilation fails with incompatible types between Service and Activity.

I've seen sample code on the web which registers broadcast receiver in an extended Service class. Can the same be done in this library?

Thanks,
Peter

Multiple apps installed on same device result in broadcast reciever conflicts

Hello,

I have experimented with using this library in mor than one sample app that I worked on.
Given the following scenario:
App A starts an upload and then goes in background mode. Start app B, and start an upload.
Now, whichever upload finishes first, it will broadcast a notification, which will crash the other app, since they both have registered a broadcast receiver which expects the same notification action, but the data returned is different (obviously the backend implementation for the upload is different, hence response is different).
I have found a way around this, by modifying:

UploadService.ACTION_UPLOAD = "something_custom"
UploadService.BROADCAST_ACTION = "something_custom"

It would be cool if you could make the references public, and these could be initialized to something custom by the users, who include the library in their apps.

Cheers, great lib !

Feature request: cancelling upload task

Hello,

I implemented your library in my project and it works wonders.
However, I have a new requirement: the user must be able to cancel a running upload, by clicking on a dialog button.
So far so good, but I can't figure a way to cancel an upload task. Any thoughts?

Retry and codes issue

Hi,

It is an excellent library, and however there are few bugs.

  1. when we upload a few files, it does not notified failed images to user
  2. there is no retry logic to make sure files have been transferred.
  3. byte reading logic is not correct. it is sending more empty bytes instead of remaining bytes when buffer size less than remaining data.

I hope that It could help to improve it and excellent job again.

Thanks

POST parameters are not received from the server.

I have used this library for various projects for a long time. Today I started running into a problem where none of the parameters sent via POST is not received by the server. They are simply missing at server end. I use a class with my own coding to make POST requests which do not have files and they work fine. Only requests made using this library fail with no POST parameters.

EDIT : I must note here that this was one specific server that was having the problem. The iOS version of the same app was successfully making successful POST requests as well.

Cannot compile with gradle

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

how to omit `parameterName` when using custom headers

Hello, I am using an external library which provides me with this object:

package com.baasbox.android.net;

import java.io.InputStream;
import java.util.Map;

/**
 * Reifies an http request.
 * Created by eto on 23/12/13.
 */
public class HttpRequest {
// ------------------------------ FIELDS ------------------------------

    public static final int GET = 1;
    public static final int POST = 2;
    public static final int PUT = 3;
    public static final int DELETE = 4;
    public static final int PATCH = 5;

    public final int method;
    public final String url;
    public final Map<String, String> headers;
    public File body;

// --------------------------- CONSTRUCTORS ---------------------------
    public HttpRequest(int method, String url, Map<String, String> headers, File body) {
        this.method = method;
        this.url = url;
        this.headers = headers;
        this.body = body;
    }

// ------------------------ CANONICAL METHODS ------------------------

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder("{url ->" + url + " method: " + methodToString(method) + ", headers ->{");
        for (Map.Entry<String, String> header : headers.entrySet()) {
            sb.append(header.getKey() + ":" + header.getValue());
        }
        sb.append("}}");

        return sb.toString();
    }

    private static String methodToString(int method) {
        String methodName;
        switch (method) {
            case GET:
                methodName = "GET";
                break;
            case POST:
                methodName =  "POST";
                break;
            case PUT:
                methodName = "PUT";
                break;
            case DELETE:
                methodName = "DELETE";
                break;
            case PATCH:
                methodName = "PATCH";
                break;
            default:
                throw new IllegalArgumentException("Invalid http method identifier");
        }
        return methodName;
    }
}

My question is: how can i omit the "parameter-name" below when adding a file to be uploaded by your library?

request.addFileToUpload("/absolute/path/to/your/file",
                            "parameter-name",
                            "custom-file-name.extension",
                            "content-type"));

I just wanna provide the url headers and file(body) because thats all i have.

no multipart boundary content

i was try to upload a file with multipart-data and i use Charles for debugging and the custom API i use says that the request i have doesn't have a multipart boundary content

Upload file on Akamai Server

Uploads to Akami servers fail.

From what I was told, this was because not Content-Length was being passed in the headers.
After a lot of debugging, turns out conn.setChunkedStreamingMode(0) is the issue. Setting the chucked mode sends by default data is 1024 bytes and it sends headers with each bit of data. I would recommend removing this option.

sendto failed: EPIPE (Broken pipe)

Hi Alex,

I am experiencing a strange problem with the uploading service.
I use the library to upload images to a remote server but the uploading service seems unreliable.

In my test, the uploading service is triggered by a button click. Sometimes the uploading service goes well.

But sometime it returns an error message (captured below).
I tried to click the "upload" button again when the first upload failed, most of the time, the upload will be successful in the second time.

Am I not missing any configuration?

Error Message
06-09 21:48:53.613 17985-17985/com.rick.er E/er﹕ Error in upload with ID: 782f1e16-9a1b-4448-b862-7f8eb7867b5a. sendto failed: EPIPE (Broken pipe)
java.net.SocketException: sendto failed: EPIPE (Broken pipe)
at libcore.io.IoBridge.maybeThrowAfterSendto(IoBridge.java:550)
at libcore.io.IoBridge.sendto(IoBridge.java:519)
at java.net.PlainSocketImpl.write(PlainSocketImpl.java:511)
at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269)
at libcore.net.http.ChunkedOutputStream.writeHex(ChunkedOutputStream.java:102)
at libcore.net.http.ChunkedOutputStream.writeBufferedChunkToSocket(ChunkedOutputStream.java:128)
at libcore.net.http.ChunkedOutputStream.close(ChunkedOutputStream.java:118)
at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:812)
at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:293)
at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:505)
at androidUpload.src.com.alexbbb.uploadservice.UploadService.handleFileUpload(UploadService.java:172)
at androidUpload.src.com.alexbbb.uploadservice.UploadService.onHandleIntent(UploadService.java:138)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.os.HandlerThread.run(HandlerThread.java:60)
Caused by: libcore.io.ErrnoException: sendto failed: EPIPE (Broken pipe)
at libcore.io.Posix.sendtoBytes(Native Method)
at libcore.io.Posix.sendto(Posix.java:151)
at libcore.io.BlockGuardOs.sendto(BlockGuardOs.java:177)
at libcore.io.IoBridge.sendto(IoBridge.java:517)
            at java.net.PlainSocketImpl.write(PlainSocketImpl.java:511)
            at java.net.PlainSocketImpl.access$100(PlainSocketImpl.java:46)
            at java.net.PlainSocketImpl$PlainSocketOutputStream.write(PlainSocketImpl.java:269)
            at libcore.net.http.ChunkedOutputStream.writeHex(ChunkedOutputStream.java:102)
            at libcore.net.http.ChunkedOutputStream.writeBufferedChunkToSocket(ChunkedOutputStream.java:128)
            at libcore.net.http.ChunkedOutputStream.close(ChunkedOutputStream.java:118)
            at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:812)
            at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:293)
            at libcore.net.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:505)
            at androidUpload.src.com.alexbbb.uploadservice.UploadService.handleFileUpload(UploadService.java:172)
            at androidUpload.src.com.alexbbb.uploadservice.UploadService.onHandleIntent(UploadService.java:138)
            at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:153)
            at android.os.HandlerThread.run(HandlerThread.java:60)

multi thread uploading

Do you have plan to support concurrent uploading in the near future? e.g using threadPoolExecutor or an array of threads( like the one done by volly) for a better performance?

Large File Uploads

Great library. It's working well in my tests. Large files are causing some issues though. I'm wondering if you have encountered this at all.

06-23 12:20:25.957: E/AndroidRuntime(7989): FATAL EXCEPTION: IntentService[com.alexbbb.uploadservice.UploadService]
06-23 12:20:25.957: E/AndroidRuntime(7989): java.lang.OutOfMemoryError
06-23 12:20:25.957: E/AndroidRuntime(7989): at java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
06-23 12:20:25.957: E/AndroidRuntime(7989): at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:201)
06-23 12:20:25.957: E/AndroidRuntime(7989): at com.android.okhttp.internal.http.RetryableOutputStream.write(RetryableOutputStream.java:64)
06-23 12:20:25.957: E/AndroidRuntime(7989): at com.alexbbb.uploadservice.UploadService.uploadFiles(UploadService.java:277)
06-23 12:20:25.957: E/AndroidRuntime(7989): at com.alexbbb.uploadservice.UploadService.handleFileUpload(UploadService.java:150)
06-23 12:20:25.957: E/AndroidRuntime(7989): at com.alexbbb.uploadservice.UploadService.onHandleIntent(UploadService.java:122)
06-23 12:20:25.957: E/AndroidRuntime(7989): at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
06-23 12:20:25.957: E/AndroidRuntime(7989): at android.os.Handler.dispatchMessage(Handler.java:102)
06-23 12:20:25.957: E/AndroidRuntime(7989): at android.os.Looper.loop(Looper.java:136)
06-23 12:20:25.957: E/AndroidRuntime(7989): at android.os.HandlerThread.run(HandlerThread.java:61)

I'm running version 1.0 of the UploadService.
Device is a Galazy S5.

Let me know if you need any other info from me.

Binary upload documentation

There is a plugin for NativeScript using the binary upload live here:
https://www.npmjs.com/package/nativescript-background-http
There is a nodejs server used for its automation tests here:
https://github.com/NativeScript/nativescript-background-http/blob/master/examples/www/server.js
There is no Java example there since its used from bindings to JavaScript in the plugin.

  • Update the README.md with and example for a single file binary upload
  • Add a simple nodejs server example (simpler than the server for the automation tests)
  • Consider adding the nativescript-background-http in the used by section

(I will send you a pull request in about 10 days with these)

Chat application porblem

Hello,

when i upload an picture with the android-upload-service from the room everything works great.
if i get out from the room and come back i get this message

    at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:871)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5221)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
 Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.Application android.app.Activity.getApplication()' on a null object reference
        at com.nuro.messaging.ChatFragment.sendMessage(ChatFragment.java:479)
        at com.nuro.messaging.ChatFragment.access$500(ChatFragment.java:63)
        at com.nuro.messaging.ChatFragment$11.onCompleted(ChatFragment.java:648)
        at com.alexbbb.uploadservice.AbstractUploadServiceReceiver.onReceive(AbstractUploadServiceReceiver.java:38)
        at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:861)

            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)

its happens to me only when i try to upload another file, but if i send text it works fine.
maybe it related to the service?
if you need extra information you need to know tell me please.

Best
Idan

how to upload multiple files?

Hi,Alex,how to upload multiple files?
i try to do it like this,but failed。

UploadRequest request = new UploadRequest(this, UUID.randomUUID().toString(), erverUrlString);
request.addFileToUpload(fileToUploadPath_1, paramNameString, "1.jpg",
ContentType.APPLICATION_OCTET_STREAM);
request.addFileToUpload(fileToUploadPath_2, paramNameString, "2.jpg",
ContentType.APPLICATION_OCTET_STREAM);
UploadService.startUpload(request);

the code just uploaded “1.jpg”,have not upload "2.jpg"。

Gradle build Failure

i've added screen shots of build.gradle (Project) and build.gradle (Module : app ) . build fails when a add this dependency :

        compile 'com.github.alexbbb:android-upload-service:1.3'

and error is :

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

screen shot 2015-08-30 at 11 49 47 am
screen shot 2015-08-30 at 11 50 05 am

sendto failed: EPIPE (Broken pipe)

hello,
I implemented your library in my project and it works great for small pics...

but most of the time when i try to upload big images ,i am getting following exception
java.net.SocketException: sendto failed: EPIPE (Broken pipe)...

Or some times it's just displaying error notification...
can you please suggest me??

Servlet web Server

Can you provide an example about how servlet to receive the uploaded file?

405 Error from Nginx/uWSGI

This worked with the PHP test script, where PHP runs behind Nginx. I then configured uWSGI and a Python upload app to save the uploaded files. But, that came back with "405 Not Allowed" error, after the file was sent to Nginx (see screenshot).
screen shot 2015-02-02 at 4 23 20 pm

The Python method to save the file was never invoked. After checking the Nginx and uWSGI configurations for a day without getting anywhere, I resorted to capturing the upload exchange with Wireshark.
screen shot 2015-02-02 at 4 20 28 pm

As you can see from the screenshot, there was a malformed packet error msg sent by the server (129.168.1.41) back to the Android client (129.168.1.79). More detail in screenshot below, but nothing that gave useful clue.
screen shot 2015-02-02 at 4 17 26 pm

Any idea what the issue might be? Or how to track it down?

Thanks!

Feature request: retry failed uploads

Hi Alex. Congratulations on this work.
I just started to use it and it was really easy to set it up.

Now I'm trying to create a behavior that shows a notification telling "Touch to retry" when the upload fails, however, I'm not finding a option for that.

Am I missing anything or android-upload-service indeed do not provides a way to do this?

suggestion: set extra data

I'd like to remove files after upload. For that, it would be good to put values before start the service and to get them at the handler afterwards.

Error on chunked responses

When i use an node.js server with express, it's sets chunked responses by default.

Chunked responses don't seems to work with the InputStream

base64 format

hello,

i need to upload to my server picture in base64.

the server need 2 parameters: the base64 string, token (Body)

can i do it with this amazing library?

build.gradle

The library project doesn't include build.gradle file, causing "Configuration with name 'default' not found." error, when is referenced by other project.

Manifest merger failed when gradle build

I add compile 'com.github.alexbbb:android-upload-service:1.3' to my project dependencies

it throws gradle build error

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@theme value=(@style/HelloTheme) from AndroidManifest.xml:12:9-42
    is also present at [com.github.alexbbb:android-upload-service:1.3] AndroidManifest.xml:17:9-40 value=(@style/AppTheme)
    Suggestion: add 'tools:replace="android:theme"' to <application> element at AndroidManifest.xml:6:5-30:19 to override

What can i do?

Feature request: launch custom intent when clicking the upload notification

We have an application and we are using your library in our app. We need to open application by clicking the notification but it seems that the library is not supporting this feature. I tried to modify the library but it's not working. Will you add this feature in the library? Or can you show haw can we manage it?

not able to compile

Hi Alex,
Can you help?
I am not able to compile with android-upload-service

I am getting this error:
Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/java/jdk1.8.0_40/bin/java'' finished with non-zero exit value 2

I tried cleaning and rebuilding and it does not seem to help.

-Manju

App gradle:
apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.example.manju.parakeet"
    minSdkVersion 21
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.google.maps.android:android-maps-utils:0.3.4'
compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile project(':android-upload-service')
compile 'com.android.support:appcompat-v7:22.0.0'

}

android-upload-service gradle :

apply plugin: 'android-library'

dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
}

android {
compileSdkVersion 21
buildToolsVersion '22.0.1'

sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aidl.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
    }

    // Move the tests to tests/java, tests/res, etc...
    instrumentTest.setRoot('tests')

    // Move the build types to build-types/<type>
    // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
    // This moves them out of them default location under src/<type>/... which would
    // conflict with src/ being used by the main source set.
    // Adding new build types or product flavors should be accompanied
    // by a similar customization.
    debug.setRoot('build-types/debug')
    release.setRoot('build-types/release')
}

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.