TinkerPatch / tinkerpatch-sdk

TinkerPatch SDK
http://tinkerpatch.com
MIT License
294 stars 56 forks source link

下发补丁包后无法立即生效 #94

Closed huangboAndroid closed 6 years ago

huangboAndroid commented 6 years ago

全量下发后,重启应用无法立即生效,而且不同手机的生效时间也不一致,大概是什么原因呢。 ApplicationLike tinkerPatchApplicationLike = TinkerPatchApplicationLike.getTinkerPatchApplicationLike();

    // 初始化TinkerPatch SDK, 更多配置可参照API章节中的,初始化SDK
    if(tinkerPatchApplicationLike != null) {
        TinkerPatch.init(tinkerPatchApplicationLike)
                .reflectPatchLibrary()
                .setPatchRollbackOnScreenOff(true)
                .setPatchRestartOnSrceenOff(true)
                .setFetchDynamicConfigIntervalByHours(1);

        TinkerPatch.with().fetchPatchUpdate(true);
        TinkerPatch.with().fetchPatchUpdateAndPollWithInterval();

}

这是初始化代码

simpleton commented 6 years ago

http://tinkerpatch.com/Docs/dev 需要下载Debugtools 来做到实时生效

On Wed, Jun 27, 2018, 1:07 AM huangboAndroid notifications@github.com wrote:

全量下发后,重启应用无法立即生效,而且不同手机的生效时间也不一致,大概是什么原因呢。 ApplicationLike tinkerPatchApplicationLike = TinkerPatchApplicationLike.getTinkerPatchApplicationLike();

// 初始化TinkerPatch SDK, 更多配置可参照API章节中的,初始化SDK
if(tinkerPatchApplicationLike != null) {
    TinkerPatch.init(tinkerPatchApplicationLike)
            .reflectPatchLibrary()
            .setPatchRollbackOnScreenOff(true)
            .setPatchRestartOnSrceenOff(true)
            .setFetchDynamicConfigIntervalByHours(1);

    TinkerPatch.with().fetchPatchUpdate(true);
    TinkerPatch.with().fetchPatchUpdateAndPollWithInterval();

}

这是初始化代码

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TinkerPatch/tinkerpatch-sdk/issues/94, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbvYuuJZFwXMjYyKBrrKXyyDiki6VBPks5uAz1WgaJpZM4U5Pal .