- 
                Notifications
    
You must be signed in to change notification settings  - Fork 347
 
0x03g SM_Block_zh
        hui.zhao edited this page Mar 27, 2020 
        ·
        1 revision
      
    使用如下配置进行安装
GodEye.instance().install(GodEyeConfig.defaultConfigBuilder().withSmConfig(new GodEyeConfig.SmConfig(true, 500, 500, 1000)).build());或者
<sm debugNotification="true"
    dumpIntervalMillis="1000"
    longBlockThresholdMillis="500"
    shortBlockThresholdMillis="500"/>debugNotification表示发生卡顿的时候是否在手机上显示通知,dumpIntervalMillis表示发生卡顿之后dump堆栈的间隔,longBlockThresholdMillis表示长卡顿的阈值,shortBlockThresholdMillis表示短卡顿的阈值,长卡顿会同时带上卡顿的堆栈,短卡顿则不会
使用如下方式监听模块输出的数据:
try {
            GodEye.instance().observeModule(GodEye.ModuleName.SM, new Consumer<BlockInfo>() {
                @Override
                public void accept(BlockInfo blockInfo) throws Exception {
                }
            });
        } catch (UninstallException e) {
            e.printStackTrace();
        }回调会在每次发生卡顿的时候
