com.tencent.tinker.lib.reporter.DefaultPatchReporter Java Examples
The following examples show how to use
com.tencent.tinker.lib.reporter.DefaultPatchReporter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TinkerManager.java From tinkerpatch-sdk with MIT License | 6 votes |
/** * you can specify all class you want. * sometimes, you can only install tinker in some process you want! * * @param appLike ApplicationLike */ public static void installTinker(ApplicationLike appLike) { if (isInstalled) { TinkerLog.w(TAG, "install tinker, but has installed, ignore"); return; } //or you can just use DefaultLoadReporter LoadReporter loadReporter = new TinkerServerLoadReporter(appLike.getApplication()); //or you can just use DefaultPatchReporter PatchReporter patchReporter = new DefaultPatchReporter(appLike.getApplication()); //or you can just use DefaultPatchListener PatchListener patchListener = new TinkerServerPatchListener(appLike.getApplication()); //you can set your own upgrade patch if you need AbstractPatch upgradePatchProcessor = new UpgradePatch(); TinkerInstaller.install(appLike, loadReporter, patchReporter, patchListener, TinkerServerResultService.class, upgradePatchProcessor ); isInstalled = true; }
Example #2
Source File: SampleApplication.java From tinkerpatch-andresguard-sample with MIT License | 5 votes |
/** * 自定义Tinker类的高级用法, 一般不推荐使用 * 更详细的解释请参考:http://tinkerpatch.com/Docs/api */ private void complexSample() { TinkerPatch.Builder builder = new TinkerPatch.Builder(tinkerApplicationLike); //修改tinker的构造函数,自定义类 builder.listener(new DefaultPatchListener(this)) .loadReporter(new DefaultLoadReporter(this)) .patchReporter(new DefaultPatchReporter(this)) .resultServiceClass(TinkerServerResultService.class) .upgradePatch(new UpgradePatch()) .patchRequestCallback(new TinkerPatchRequestCallback()); TinkerPatch.init(builder.build()); }
Example #3
Source File: SampleApplicationLike.java From tinkerpatch-sample with MIT License | 5 votes |
/** * 自定义Tinker类的高级用法,一般不推荐使用 * 更详细的解释请参考:http://tinkerpatch.com/Docs/api */ private void complexSample() { TinkerPatch.Builder builder = new TinkerPatch.Builder(this); //修改tinker的构造函数,自定义类 builder.listener(new DefaultPatchListener(getApplication())) .loadReporter(new DefaultLoadReporter(getApplication())) .patchReporter(new DefaultPatchReporter(getApplication())) .resultServiceClass(TinkerServerResultService.class) .upgradePatch(new UpgradePatch()) .patchRequestCallback(new TinkerPatchRequestCallback()); TinkerPatch.init(builder.build()); }