当前位置: 首页>>代码示例>>Java>>正文


Java TinkerInstaller.install方法代码示例

本文整理汇总了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;
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:27,代码来源:TinkerManager.java

示例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;
}
 
开发者ID:GitLqr,项目名称:HotFixDemo,代码行数:26,代码来源:TinkerManager.java

示例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;
    }
 
开发者ID:baidao,项目名称:tinker-manager,代码行数:27,代码来源:SampleTinkerManager.java

示例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;
}
 
开发者ID:TinkerPatch,项目名称:tinkerpatch-sdk,代码行数:27,代码来源:TinkerManager.java

示例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;

}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:13,代码来源:TinkerManager.java

示例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;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:9,代码来源:TinkerManager.java

示例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;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:13,代码来源:TinkerManager.java

示例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;

}
 
开发者ID:GitLqr,项目名称:HotFixDemo,代码行数:14,代码来源:TinkerManager.java

示例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;

}
 
开发者ID:baidao,项目名称:tinker-manager,代码行数:13,代码来源:SampleTinkerManager.java


注:本文中的com.tencent.tinker.lib.tinker.TinkerInstaller.install方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。