ahorn / android-rss

Lightweight Android library to parse RSS 2.0 feeds.
529 stars 179 forks source link

Replace HttpClient with HttpURLConnection #34

Open Fleker opened 7 years ago

Fleker commented 7 years ago

Trying to compile with this library in my app on API level 25 and it's not working.

Error:(46, 13) Failed to resolve: org.apache.httpcomponents:httpclient:4.5

After examining some other help it seems like your library is using an old networking library that is not present in the latest versions of Android (and beyond).

Seems like the problem lies in the RSSReader class right at the start.

public RSSFeed load(String uri) throws RSSReaderException {
    HttpGet httpget = new HttpGet(uri);

With some slight tweaking of how the data is retrieved, it should be easy to replace this in the app without any other impact.

ahorn commented 7 years ago

Thanks Fleker.

With some slight tweaking of how the data is retrieved, it should be easy to replace this in the app without any other impact.

I'd be happy to merge a pull request for a patch that updates the version number of httpclient and tweaks the retrieval mechanism accordingly.

ahorn commented 7 years ago

Thank you Nick for the patch, merged. Have a good weekend.

ghost commented 7 years ago

Thank you, could you update Gradle dependency pls?

Fleker commented 7 years ago

The dependency should automatically be updated using jitpack. Has it not?

ghost commented 7 years ago

I still get that error during gradle build. (com.github.ahorn:android-rss:v1.0-rc1)

ahorn commented 6 years ago

Hi @Fleker, Hello @Onregs

For some time now, I wanted to update the README with some contributor information, and references to projects/products that are using android-rss. If you are willing to share any of this information, please feel free to provide the following, or a subset thereof:

Many thanks again for your contributions!