Delta


Source link: https://github.com/byteam/delta

??wiki

Delta offers your android app the hot fix and incremental upgrade powers.

Principle

Inspired by wechat's Tinker, please check this page for more information.

Features

  1. Kind to developers and easy to use.
  2. Hot fix and incremental upgrade(on the schedule).
  3. Supports all platform versions.
  4. Fine compatibility.
  5. Negligible performance cost.

To be improved

  1. Verify patch file.
  2. Handle exception.
  3. Incremental upgrade.
  4. It's up to you.

How to get

In your project's build.gradle

buildscript {

  repositories {

jcenter()
  
}

  dependencies {

classpath 'com.android.tools.build:gradle:x.y.z'

classpath 'org.byteam.delta:delta-gradle-plugin:x.y.z'

...
  
}
 
}
 

In your application module's build.gradle

apply plugin: 'com.android.application' apply plugin: 'delta' ... delta {

  enable true
  autoPushPatchToDevice true // for test 
}
 

Configurations

Avaliable options:

option type usage default
enable boolean enable delta or not false
versionCode int specify application's version code variant's version code
deltaVersion String specify delta library's version same as plugin version
maxNumberOfIdxPerDex int max number of methods in per dex 0xFF00
mapping String specify the mapping file null
autoPushPatchToDevice boolean auto push patch to device rom, used for test fale

Generate patch dex

The delta gradle plugin will create some tasks:

  1. Execute backup task to backup the dex and mapping files for future usage.
  2. Find bugs, fix it(change some code).
  3. Execute patch task, this task will apply existing mapping or specifed mapping and generate a new dex, then produce the final patch.

The final patch directory looks like this:

How to use

In your own Application:

public class App extends Application {

@Override
  protected void attachBaseContext(Context base) {

super.attachBaseContext(base);

// Install existing patch

Delta.install(this);

  
}

... 
}
 
/**  * ????????patch,??????,??????????.  *  * @param context Context  */ Delta.applyPatchFromDevice(Context context);
  /**  * ?????patch. ????????,?????UI????.  *  * @param context  Context  * @param patchDex patch??  */ Delta.applyPatch(Context context, File patchDex);
  /**  * ??????.  *  * @param context  Context  */ Delta.clean(Context context;  

Partners

Looking forward to your join!

Thanks to

  1. MultiDex
  2. ?????????
  3. Binary diff/patch utility
  4. ??App???????????
  5. Instant Run: How Does it Work?

License

Apache 2.0

Resources

Its a library to add customer-support module to any android app. Its fully built on firebase and easy to integrate. It also has inbuilt admin section to monitor and resolve tickets raised.

Extensions of Leanback Support Library for Android TV.

Voice Record Button that has ripple effect with users voice using approximated decibels from max amplitude.

An Implementation of the Actor-Model in pure Android components, also supports inter-process communication between Actors.

An expandable LinearLayout.

Project that demonstrates the entire animation stack present in the Uber app.

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