Description
This project is for downloading items(songs, images etc) in Android using RxJava2. There are, however 2 conditions which I have set for downloading.
* Only 2 items can be downloaded at a time. So even if the user clicks multiple items to download, only 2 of them will be actually downloaded at a time and the rest of the downloads will be en queued.
* The download percent is shown to the user. But only if the difference between the current percentage and the previously shown percentage is greater than 5 percent.
Downloader Demo using RxJava alternatives and similar packages
Based on the "App" category.
Alternatively, view Downloader Demo using RxJava alternatives based on common mentions on social networks and blogs.
-
InstaMaterial
Implementation of Instagram with Material Design (originally based on Emmanuel Pacamalan's concept) -
Twidere-Android
Twidere is a powerful twitter client for Android 1.6+ 1 , which gives you a full Holo experience and nearly full Twitter's feature. -
Foodium 🍲
🍲Foodium is a sample food blog Android application 📱 built to demonstrate the use of Modern Android development tools - (Kotlin, Coroutines, Flow, Dagger 2/Hilt, Architecture Components, MVVM, Room, Retrofit, Moshi, Material Components). -
jianshi
A Full-Stack mobile app, including Android & Server, Simple-Poem 简诗. You can write poem in graceful & traditional Chinese style. -
Leisure
Leisure is an Android App containing Zhihu Daily,Guokr Scientific,XinhuaNet News and Douban Books -
WaniKani-for-Android
DISCONTINUED. An Android client application for the awesome kanji learning website wanikani.com -
LeeCo
LeeCo is an awesome app for (including unlock) problems, solutions, discuss(from leetcode) and comments. -
FoldingNavigationDrawer-Android
This is a sample project present how to use Folding-Android to add Folding Efect to Navigation Drawer. -
GradientDrawableTuner
🕹️ See how the properties of Android's "shape" affect the Drawable's appearance, intuitively. -
MaterialDesignColorPalette
This is a dev tool to visualize the colours of Material design defined on -
freegemas-gdx
Freegemas libGDX is an Android and Java desktop port of Freegemas, which in turn is an open source version of the well known Bejeweled. -
vanilla
Vanilla Music Player for Android (abandoned). Visit https://github.com/vanilla-music/vanilla for an actively developed fork -
PopularMovies
:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.
InfluxDB - Purpose built for real-time analytics at any scale.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Downloader Demo using RxJava or a related project?
README
Downloader Demo using RxJava
Overview
This project is for downloading items(songs, images etc) in Android using RxJava2. There are, however 2 conditions which I have set for downloading.
- Only 2 items can be downloaded at a time. So even if the user clicks multiple items to download, only 2 of them will be actually downloaded at a time and the rest of the downloads will be en queued.
- The download percent is shown to the user. But only if the difference between the current percentage and the previously shown percentage is greater than 5 percent.
Demo
[](rxdownloader_demo.gif)
There are few important RxJava classes that I have used to do this project:
- Observable - Emits a stream of events
- Flowable - Emits a stream of events. The Flowable is created using a BackpressureStrategy like BackpressureStrategy.BUFFER or BackpressureStrategy.DROP. So, if the number of items emitted by the Flowable is greater than the number of items consumed by the subscriber, based on the BackpressureStrategy, the extra items will either be buffered or dropped.
- Observer - Used to observe/subscribe a stream of events. Whenever the observer is connected to the Observable, a Disposable object is received, which is further used to dispose the connection. This class has 4 methods.
- Subscriber - Similar to Observer, this class is also used to observe/subscribe a stream of events and has 4 methods. But instead of Disposable object, a Subscription option is received at the time of connection, which is further used to dispose the connection or request new items from the stream.
I wrote a blog about how I used RxJava2 for achieving this. Here is the post.
NOTE : Since this is a demo project and not an actual project, I have kept the images and urls to be downloaded hardcoded in the client. There is no server call. Also, for every item I am saving the download status and download percent in the shared preference. In a real project, it should be ideally saved in a database.
Checkout my other projects
AppDataReader - A library for reading Shared Preferences and Database values within the application.
RxFbLiveVideoEmoticons - Demo of Fb Live Video Reactions using RxJava2.
WebViewDemo - A demo project for showing how to use WebViews in Android.