Amigo, is an android platform of the hotfix library, by the hungry company open source.
Usage
In the Build.gradle of project
dependencies {
Classpath ' me.ele:amigo:0.0.5 '
}
In the Build.gradle of module
Apply plugin: ' Me.ele.amigo '
It's so easy to integrate the Amigo.
Effective Patch Pack
There are two ways to choose a patch package:
Effective later patch Packs
If you do not want to take effect immediately but the user opens the app for the second time (Getting Started tutorial qkxue.net), it will automatically take effect the second time it is opened. This method can be used to
File hotfixapk = amigo.gethotfixapk (context); Fileutils.copyfile (Yourapkfile, hotfixapk); Amigo.worklater (context); Amigo.worklater (context, apkfile);
Immediate Effect Patch Pack
If you want the patch package to take effect immediately, call one of the following two methods, and the APP will restart immediately and break into the patch pack.
Amigo.work (context);
Amigo.work (context, apkfile);
Remove a patch Pack
If you need to remove the already good patch package, you can use this method (mobile app development company Ty300.com)
Amigo.clear (context);
Tip: If the APK has changed, Amigo will automatically erase the previous apk.
Related reading:
Https://github.com/eleme/Amigo/wiki
https://github.com/WeMobileDev/article/blob/master/%E5%BE%AE%E4%BF%A1Android%E7%83%AD%E8%A1%A5%E4%B8%81%E5%AE% 9e%e8%b7%b5%e6%bc%94%e8%bf%9b%e4%b9%8b%e8%b7%af.md
Android Hotfix Library Amigo