ProgressManager


Source link: https://github.com/JessYanCoding/ProgressManager

ProgressManager

Listen the progress of downloading and uploading in Okhttp (compatible Retrofit and Glide).

????

Overview

Introduction

ProgressManager a line of code to listen App all the links and upload the progress of the network, including Glide picture loading progress, to achieve the principle of similar EventBus, you can be in anywhere in App, the number of listeners to Url address as an identifier, registered to the framework, when this Url address haves to download or upload the action, the framework will take the initiative to call All listeners registered with this Url address are synchronized to multiple modules.

Feature

  • Easy to use, just a line of code to listen progress.
  • Multi-platform support, support Okhttp , Retrofit , Glide ,Use Okhttp native Api , there is no compatibility problem.
  • Low coupling, the actual request and the progress of the receiver does not exist directly or indirectly, that can be anywhere in App to receive progress information.
  • Low intrusion, use this framework you do not need to change the code before uploading or downloading, ie using or not using this framework does not affect the original code.
  • Multi-end synchronization, the same data source upload or download progress can specify a number of different receivers, less to use EventBus achieve multiple port synchronization update progress.
  • Support multi-file upload
  • Support URL redirection
  • Automatic management of the listener, less to manually cancel the trouble of the listener.
  • The default run in the main line layer, less to switch the thread of trouble.
  • Lightweight framework, does not contain any three-party library, very small size.

Download

 compile 'me.jessyan:progressmanager:1.5.0'

Usage

Step 1

 // When building OkHttpClient, the OkHttpClient.Builder() is passed to the with() method to initialize the configuration  OkHttpClient = ProgressManager.getInstance().with(new OkHttpClient.Builder())

  .build();

Step 2

 // Glide load  ProgressManager.getInstance().addResponseListener(IMAGE_URL, getGlideListener());

 // Okhttp/Retofit download  ProgressManager.getInstance().addResponseListener(DOWNLOAD_URL, getDownloadListener());

 // Okhttp/Retofit upload  ProgressManager.getInstance().addRequestListener(UPLOAD_URL, getUploadListener());

ProGuard

 -keep class me.jessyan.progressmanager.** {
 *; 
}
  -keep interface me.jessyan.progressmanager.** {
 *; 
}
 

Donate

About Me

License

 Copyright 2017, jessyan
  Licensed under the Apache License, Version 2.0 (the "License");

 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License. 

Resources

Dotted-style progress bar.

Allows the easy creation of animated transition effects when the state of Android UI has changed.

AspectJ is an aspect-oriented programming (AOP) extension for the Java programming language.

Foursquare native authentication (foursquare-android-native-oauth) makes it easier for your app's users to connect with Foursquare. Unlike web-based OAuth, native authentication re-uses the Foursquare app's user credentials, saving users the hassle of re-logging in to Foursquare within your app.

Heimdall is an OAuth 2.0 client specifically designed for easy usage and high flexibility. It supports all grants as described in Section 4 as well as refreshing an access token as described in Section 6 of the The OAuth 2.0 Authorization Framework specification.

AEB - Android Easy Binding. Android View properties binding to the Business Objects (known as POJO).

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes