本文整理汇总了Java中com.tencent.tinker.lib.tinker.TinkerInstaller.install方法的典型用法代码示例。如果您正苦于以下问题:Java TinkerInstaller.install方法的具体用法?Java TinkerInstaller.install怎么用?Java TinkerInstaller.install使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.tencent.tinker.lib.tinker.TinkerInstaller
的用法示例。
在下文中一共展示了TinkerInstaller.install方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
* you can specify all class you want.
* sometimes, you can only install tinker in some process you want!
*
* @param appLike
*/
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 SampleLoadReporter(appLike.getApplication());
//or you can just use DefaultPatchReporter
PatchReporter patchReporter = new SamplePatchReporter(appLike.getApplication());
//or you can just use DefaultPatchListener
PatchListener patchListener = new SamplePatchListener(appLike.getApplication());
//you can set your own upgrade patch if you need
AbstractPatch upgradePatchProcessor = new UpgradePatch();
TinkerInstaller.install(appLike,
loadReporter, patchReporter, patchListener,
SampleResultService.class, upgradePatchProcessor);
isInstalled = true;
}
示例2: installTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
* 自定义安装Tinker(使用你自定义的reporter类:SampleLoadReporter、SamplePatchReporter、SamplePatchListener、SampleResultService)
* you can specify all class you want.
* sometimes, you can only install tinker in some process you want!
*/
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 SampleLoadReporter(appLike.getApplication());
//or you can just use DefaultPatchReporter
PatchReporter patchReporter = new SamplePatchReporter(appLike.getApplication());
//or you can just use DefaultPatchListener
PatchListener patchListener = new SamplePatchListener(appLike.getApplication());
//you can set your own upgrade patch if you need
AbstractPatch upgradePatchProcessor = new UpgradePatch();
TinkerInstaller.install(appLike,
loadReporter, patchReporter, patchListener,
SampleResultService.class, upgradePatchProcessor);
isInstalled = true;
}
示例3: installTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
* you can specify all class you want.
* sometimes, you can only install com.dx168.patchsdk.sample in some process you want!
*
* @param appLike
*/
public static void installTinker(ApplicationLike appLike) {
if (isInstalled) {
TinkerLog.w(TAG, "install com.dx168.patchsdk.sample, but has installed, ignore");
return;
}
//or you can just use DefaultLoadReporter
LoadReporter loadReporter = new SampleLoadReporter(appLike.getApplication());
//or you can just use DefaultPatchReporter
PatchReporter patchReporter = new SamplePatchReporter(appLike.getApplication());
//or you can just use DefaultPatchListener
PatchListener patchListener = new SamplePatchListener(appLike.getApplication());
//you can set your own upgrade patch if you need
// AbstractPatch upgradePatchProcessor = new SampleUpgradePatch();
AbstractPatch upgradePatchProcessor = new UpgradePatch();
TinkerInstaller.install(appLike, loadReporter, patchReporter, patchListener, SampleResultService.class,
upgradePatchProcessor);
isInstalled = true;
}
示例4: installTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
* 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;
}
示例5: sampleInstallTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
* all use default class, simply Tinker install method
*/
public static void sampleInstallTinker(ApplicationLike appLike) {
if (isInstalled) {
TinkerLog.w(TAG, "install tinker, but has installed, ignore");
return;
}
TinkerInstaller.install(appLike);
isInstalled = true;
}
示例6: sampleInstallTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
public static void sampleInstallTinker(ApplicationLike appLike) {
if (isInstalled) {
TinkerLog.w(TAG, "install tinker, but has installed, ignore", new Object[0]);
return;
}
TinkerInstaller.install(appLike);
isInstalled = true;
}
示例7: installTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
public static void installTinker(ApplicationLike appLike) {
if (isInstalled) {
TinkerLog.w(TAG, "install tinker, but has installed, ignore", new Object[0]);
return;
}
ApplicationLike applicationLike = appLike;
TinkerInstaller.install(applicationLike, new SampleLoadReporter(appLike.getApplication())
, new SamplePatchReporter(appLike.getApplication()), new SamplePatchListener
(appLike.getApplication()), OneTinkerResultService.class, new
UpgradePatch(), new RepairPatch());
isInstalled = true;
}
示例8: sampleInstallTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
* 默认安装Tinker(使用默认的reporter类:DefaultLoadReporter、DefaultPatchReporter、DefaultPatchListener、DefaultTinkerResultService)
* 如果你不需要对监听app打补丁的情况(如:当打补丁失败时上传失败信息),则使用该方法
*/
public static void sampleInstallTinker(ApplicationLike appLike) {
if (isInstalled) {
TinkerLog.w(TAG, "install tinker, but has installed, ignore");
return;
}
TinkerInstaller.install(appLike);
isInstalled = true;
}
示例9: sampleInstallTinker
import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
* all use default class, simply Tinker install method
*/
public static void sampleInstallTinker(ApplicationLike appLike) {
if (isInstalled) {
TinkerLog.w(TAG, "install com.dx168.patchsdk.sample, but has installed, ignore");
return;
}
TinkerInstaller.install(appLike);
isInstalled = true;
}