All Projects → zhongjhATC → Retrofit2Rxjava2Download

zhongjhATC / Retrofit2Rxjava2Download

Licence: other
这是用Retrofit2和Rxjava2搭配封装的下载文件。

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Retrofit2Rxjava2Download

Rx Mvp
RxJava2+Retrofit2+RxLifecycle2+OkHttp3 封装RHttp 使用MVP模式构建项目
Stars: ✭ 343 (+1705.26%)
Mutual labels:  download, rxjava2, retrofit2
DaggerExoPlayer
This repository demonstrates ExoPlayer injection with Dagger2
Stars: ✭ 58 (+205.26%)
Mutual labels:  rxjava2, retrofit2
Cucumber
A recipe finding app written in Kotlin with MVP architecture
Stars: ✭ 64 (+236.84%)
Mutual labels:  rxjava2, retrofit2
rxandroid2-retrofit2
Small tutorial to get started with RxAndroid 2 and Retrofit 2
Stars: ✭ 55 (+189.47%)
Mutual labels:  rxjava2, retrofit2
iMoney
iMoney 金融项目
Stars: ✭ 55 (+189.47%)
Mutual labels:  rxjava2, retrofit2
RxHttp
基于RxJava2+Retrofit+OkHttp4.x封装的网络请求类库,亮点多多,完美兼容MVVM(ViewModel,LiveData),天生支持网络请求和生命周期绑定,天生支持多BaseUrl,支持文件上传下载进度监听,支持断点下载,支持Glide和网络请求公用一个OkHttpClient⭐⭐⭐
Stars: ✭ 25 (+31.58%)
Mutual labels:  rxjava2, retrofit2
PopMovies
Aplicativo em Android para organização dos seus filmes favoritos.
Stars: ✭ 41 (+115.79%)
Mutual labels:  rxjava2, retrofit2
AndroidCleanArchitecture
Android Project with clean android architecture contain Dagger, Retrofit, Retrofit, Android archtecture components, LiveData with MVVM architecture
Stars: ✭ 22 (+15.79%)
Mutual labels:  rxjava2, retrofit2
Weather-Guru-MVP
Sample Material-design Android weather application build with MVP architectural approach using Dagger2, RxJava2, Retrofit2, Event-Bus, GreenDao, Butterknife, Lottie etc.
Stars: ✭ 15 (-21.05%)
Mutual labels:  rxjava2, retrofit2
BESTV
Android TV App powered by TMDb. It is a easy way to find the best TV content, the top movies, series... all of that in your TV.
Stars: ✭ 49 (+157.89%)
Mutual labels:  rxjava2, retrofit2
codeKK-Android
http://p.codekk.com/
Stars: ✭ 29 (+52.63%)
Mutual labels:  rxjava2, retrofit2
Kotlin-MVVM-JetPack
[DEPRECATED. USE https://github.com/egek92/Kotlin-MVVM-Jetpack-Hilt-Coroutines-Flow] Clean Android architecture guidelines that are based on MVVM + Offline 1st approach with LiveData and Room
Stars: ✭ 73 (+284.21%)
Mutual labels:  rxjava2, retrofit2
GuildWars2 APIViewer
Guild Wars 2 API Viewer: An Android application used for viewing various Guild Wars 2 API endpoint responses. Developed utilizing MVVM architecture, in conjunction with Databinding, Dagger 2, Retrofit 2, and RxJava 2.
Stars: ✭ 53 (+178.95%)
Mutual labels:  rxjava2, retrofit2
flickr-android
A small sample app to showcase architecting app using Clean Architecture and MVVM
Stars: ✭ 25 (+31.58%)
Mutual labels:  rxjava2, retrofit2
MVVM-Demo
This demo for MVVM Design pattern for android
Stars: ✭ 20 (+5.26%)
Mutual labels:  rxjava2, retrofit2
GithubApp-android-architecture
Let's learn a deep look at the Android architecture
Stars: ✭ 16 (-15.79%)
Mutual labels:  rxjava2, retrofit2
Android-Mvi-Starter
Android MVI Starter application
Stars: ✭ 19 (+0%)
Mutual labels:  rxjava2, retrofit2
AndroidMultiModuleCleanArchTemplate
An Android kotlin project template with Dagger2, Rx and Architecture Components
Stars: ✭ 33 (+73.68%)
Mutual labels:  rxjava2, retrofit2
rxjava2 retrofit2
rxjava2+retrofit2 网络封装
Stars: ✭ 19 (+0%)
Mutual labels:  rxjava2, retrofit2
situp android proj
🚀一个基组件化、模块化、MVP + MVVM 计划 App,兼容安卓 10.0 9.0 8.0 等 🔥a app like keep, you can edit your plans here, and you can share your life to others by post, too.🔥
Stars: ✭ 15 (-21.05%)
Mutual labels:  rxjava2, retrofit2

这是一个由retrofit2和rxjava2一起搭配的网络框架

1.有些demo是用event来传递的,但我认为能尽量不用event的场合最好能不用(也不是说event不好,至于为什么不用event的原因可以搜索相关文章),所以这个demo是用handle来处理。

2.有进度的回调下载。

3.有销毁线程。

参考以下网站例子:

https://github.com/lizhangqu/CoreProgress

https://github.com/shuaijia/JsDownload

https://github.com/zhourongxin/RetrofitRxDownload

Step 1. Add it in your root build.gradle at the end of repositories:

allprojects {
  	repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Step 2. Add the dependency

dependencies {
	        implementation 'com.github.zhongjhATC:Retrofit2Rxjava2Download:1.0.5'
	}

例子

public class MainActivity extends AppCompatActivity implements DownloadListener {

    ```````
    ```````

    // 初始化
    private DownloadHelper mDownloadHelper = new DownloadHelper("http://www.baseurl.com", this);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        ```````
        url = "http://assets.geilicdn.com/channelapk/1000n_shurufa_1.9.6.apk";
    }

    public void download(View view) {
        // 调用方法
        mDownloadHelper.downloadFile(url, Environment.getExternalStorageDirectory() + File.separator + "/apk", "aaa.xlsx");
    }

    @Override
    protected void onDestroy() {
        // 销毁
        mDownloadHelper.dispose();
        super.onDestroy();
    }

    /**
     * 加载前
     */
    @Override
    public void onStartDownload() {

    }

    /**
     * 加载中
     */
    @Override
    public void onProgress(int progress) {
        tv.setText("下载中 : " + progress + "%");
    }

    /**
     * 加载后
     *
     * @param file 文件
     */
    @Override
    public void onFinishDownload(File file) {
        tv.setText("下载成功。\n" + file.getAbsolutePath());
    }

    /**
     * 加载失败
     *
     * @param ex 异常
     */
    @Override
    public void onFail(Throwable ex) {
        tv.setText("下载失败 : " + ex.getLocalizedMessage());
    }

}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].