File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
app/src/main/java/com/tinkerpatch/easy_sample Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,14 @@ private void initTinker() {
78
78
TinkerPatch .init (tinkerApplicationLike )
79
79
.reflectPatchLibrary ()
80
80
.setPatchRollbackOnScreenOff (true )
81
- .setPatchRestartOnSrceenOff (true );
81
+ .setPatchRestartOnSrceenOff (true )
82
+ .setFetchPatchIntervalByHours (3 );
82
83
83
84
// 获取当前的补丁版本
84
85
Log .d (TAG , "current patch version is " + TinkerPatch .with ().getPatchVersion ());
85
86
86
- // 每隔3个小时去访问后台时候有更新, 通过 handler 实现轮询的效果
87
- // 默认 setFetchPatchIntervalByHours 只是设置调用的频率限制,并没有去轮询
88
- TinkerPatch .with ().startPoll (3 );
87
+ // 每隔3个小时(通过setFetchPatchIntervalByHours设置)去访问后台时候有更新,通过handler实现轮训的效果
88
+ TinkerPatch .with ().fetchPatchUpdateAndPollWithInterval ();
89
89
}
90
90
}
91
91
You can’t perform that action at this time.
0 commit comments