本文整理汇总了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());
}
示例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());
}
示例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);
}
示例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);
}
示例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);
}
示例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());
}