erickok / transdroid

Manage your torrents from your Android device
GNU General Public License v3.0
1.29k stars 201 forks source link

Apache HTTP Legacy is deprecated and removed past API 23 #402

Open magneticflux- opened 6 years ago

magneticflux- commented 6 years ago

The Apache HTTP package should be replaced with a more modern HTTP client such as OkHttp or the built-in Android dependencies. Additionally, Dagger 2 could be used to inject a singleton HTTP client with current application settings instead of requiring initialize() methods and null checks.

erickok commented 6 years ago

I am very aware of this but I strongly rely on the library. Replacing it is certainly on my wish list but it means rewriting practically all code surrounding the connecting to torrent clients, which means rewriting all supported client code. So yeah, long term...

twig commented 1 year ago

might be time to revisit that plan 😅

I'm getting these errors by opening the master branch project in Android Studio even after Gradle sync

Compiling works fine, but it's a bit fiddly guessing your way through the code without autocomplete.

image

bwitt commented 1 year ago

yes, it's annoying. is there a good way to split this up so we don't need to do a migration all at once?

erickok commented 1 year ago

Hey guys, I am sorry for not responding much. Life... but I plan to pick up some work for Transdroid again soon and certainly this library deprecation should be part of that work. I'll probably try to use the non-bundled Apache HTTP library as that is officially maintained and I suspect not much work to migrate. At one point I tried to rewrite using OkHttp (and Retrofit) but it is a big job that requires lots of testing. If I go the latter route I will also have to depart with many smaller support clients I suspect, which are often underused, underdocumented and lacking features. Some I cannot even test myself (such as Synology) as I don;t have the hardware. Anyway, that's for soon.

jedrivisser commented 1 year ago

might be time to revisit that plan 😅

I'm getting these errors by opening the master branch project in Android Studio even after Gradle sync

Compiling works fine, but it's a bit fiddly guessing your way through the code without autocomplete.

image

@twig, this should solve your problems for local development: https://github.com/erickok/transdroid/pull/653

Though of course this is not a long term solution