tanoDxyz / GDownload

Light Weight, Fast 🚀 , Easy to Use, Reliable Download client for android.
Apache License 2.0
39 stars 2 forks source link

Do you plan to support to upload data? #17

Closed Zhao-Michael closed 4 months ago

Zhao-Michael commented 4 months ago

Or Maybe preserve the interface to custom to support upload data.....

BTW, I don't know if support the okhttp3 as the underlying connection handler ...

tanoDxyz commented 4 months ago

No current plans for uploading ..... regarding okHttp3 .

I will add examples shortly.

Zhao-Michael commented 4 months ago

Hi @tanoDxyz,

I try to add the okhttp3 as the URLConnectionHandler, mostly looks goods.

Expect that data class "RemoteConnection" (https://github.com/tanoDxyz/GDownload/blob/40dddae11544acdbf37ae781cd806c21763bed3b/gdownload/src/main/java/com/tanodxyz/gdownload/connection/RemoteConnection.kt#L9) needs to update:

since okhttp3 didn't have URLConnection (I think....), so "var connection: URLConnection," may change to var connection: URLConnection?, or just a callback like "var disconnect: () -> Unit = {}"

tanoDxyz commented 4 months ago

Sorry for late response! very busy these days.

actually ur right...

We have to change java.net.URLConnectionfrom RemoteConnection class.