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


Java TinkerInstaller.setLogIml方法代码示例

本文整理汇总了Java中com.tencent.tinker.lib.tinker.TinkerInstaller.setLogIml方法的典型用法代码示例。如果您正苦于以下问题:Java TinkerInstaller.setLogIml方法的具体用法?Java TinkerInstaller.setLogIml怎么用?Java TinkerInstaller.setLogIml使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.tencent.tinker.lib.tinker.TinkerInstaller的用法示例。


在下文中一共展示了TinkerInstaller.setLogIml方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onBaseContextAttached

import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
 * install multiDex before install tinker
 * so we don't need to put the tinker lib classes in the main dex
 *
 * @param base
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    sContext = getApplication();
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);

    TinkerManager.setTinkerApplicationLike(this);

    TinkerManager.initFastCrashProtect();
    //should set before tinker is installed
    TinkerManager.setUpgradeRetryEnable(true);

    //optional set logIml, or you can use default debug log
    TinkerInstaller.setLogIml(new MyLogImp());
    //installTinker after load multiDex
    //or you can put com.tencent.tinker.** to main dex
    TinkerManager.installTinker(this);
    Tinker tinker = Tinker.with(getApplication());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:28,代码来源:AndroidApplication.java

示例2: onBaseContextAttached

import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
 * install multiDex before install tinker
 * so we don't need to put the tinker lib classes in the main dex
 *
 * @param base
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);

    SampleApplicationContext.application = getApplication();
    SampleApplicationContext.context = getApplication();
    TinkerManager.setTinkerApplicationLike(this);

    TinkerManager.initFastCrashProtect();
    //should set before tinker is installed
    TinkerManager.setUpgradeRetryEnable(true);

    //optional set logIml, or you can use default debug log
    TinkerInstaller.setLogIml(new MyLogImp());

    //installTinker after load multiDex
    //or you can put com.tencent.tinker.** to main dex
    TinkerManager.installTinker(this);
    Tinker tinker = Tinker.with(getApplication());
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:30,代码来源:SampleApplicationLike.java

示例3: onBaseContextAttached

import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    //you must install multiDex whatever tinker is installed!
    MultiDex.install(base);

    SampleApplicationContext.application = getApplication();
    SampleApplicationContext.context = getApplication();
    TinkerManager.setTinkerApplicationLike(this);

    TinkerManager.initFastCrashProtect();
    TinkerManager.setUpgradeRetryEnable(true);

    TinkerInstaller.setLogIml(new MyLogImp());

    TinkerManager.installTinker(this);
}
 
开发者ID:xingstarx,项目名称:TinkerDemo,代码行数:19,代码来源:BaseApplicationLike.java

示例4: onBaseContextAttached

import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
/**
 * install multiDex before install com.dx168.patchsdk.sample
 * so we don't need to put the com.dx168.patchsdk.sample lib classes in the main dex
 *
 * @param base
 */
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
@Override
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    //you must install multiDex whatever com.dx168.patchsdk.sample is installed!
    MultiDex.install(base);

    SampleTinkerManager.setTinkerApplicationLike(this);
    SampleTinkerManager.initFastCrashProtect();
    //should set before com.dx168.patchsdk.sample is installed
    SampleTinkerManager.setUpgradeRetryEnable(true);

    //optional set logIml, or you can use default debug log
    TinkerInstaller.setLogIml(new SampleTinkerLog());

    //installTinker after load multiDex
    //or you can put com.tencent.com.dx168.patchsdk.sample.** to main dex
    SampleTinkerManager.installTinker(this);
}
 
开发者ID:baidao,项目名称:tinker-manager,代码行数:26,代码来源:SampleApplicationLike.java

示例5: onBaseContextAttached

import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
public void onBaseContextAttached(Context base) {
    super.onBaseContextAttached(base);
    MultiDex.install(base);
    TinkerManager.setTinkerApplicationLike(this);
    TinkerManager.initFastCrashProtect();
    TinkerManager.setUpgradeRetryEnable(true);
    TinkerInstaller.setLogIml(new OneTinkerLogImp());
    TinkerManager.installTinker(this);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:10,代码来源:MyApplication.java

示例6: initTinker

import com.tencent.tinker.lib.tinker.TinkerInstaller; //导入方法依赖的package包/类
private void initTinker(Context base) {
    // tinker需要你开启MultiDex
    MultiDex.install(base);

    TinkerManager.setTinkerApplicationLike(this);
    // 设置全局异常捕获
    TinkerManager.initFastCrashProtect();
    //开启升级重试功能(在安装Tinker之前设置)
    TinkerManager.setUpgradeRetryEnable(true);
    //设置Tinker日志输出类
    TinkerInstaller.setLogIml(new MyLogImp());
    //安装Tinker(在加载完multiDex之后,否则你需要将com.tencent.tinker.**手动放到main dex中)
    TinkerManager.installTinker(this);
    mTinker = Tinker.with(getApplication());
}
 
开发者ID:GitLqr,项目名称:HotFixDemo,代码行数:16,代码来源:TinkerApplicationLike.java


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