Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

接入腾讯的tinker后无法启动更新 #82

Open
rockscy opened this issue Oct 26, 2018 · 7 comments
Open

接入腾讯的tinker后无法启动更新 #82

rockscy opened this issue Oct 26, 2018 · 7 comments

Comments

@rockscy
Copy link

rockscy commented Oct 26, 2018

接入腾讯热修复tinker后无法弹出更新Dialog,在某些版本手机中后台自动下载完后自动弹出更新,没有Dialog提示

@yjfnypeu
Copy link
Collaborator

使用关键字UpdatePluginLog进行日志过滤查看下呢?

@rockscy
Copy link
Author

rockscy commented Oct 29, 2018

没有打印log,在所有手机上无法提出更新提示,在高版本手机上会自动下载,下载完成后会弹出安装界面,低版本手机上无任何响应

@yjfnypeu
Copy link
Collaborator

log是默认就开启的。如果没有建议升级到新版使用。然后自动下载跟版本号是没关系的。默认的更新策略就是在wifi环境下不提示自动下载。下载完成调起安装。建议还是找找日志,结合起来查看一下

@renygit
Copy link

renygit commented Jan 17, 2019

我也遇到类似的问题,不知道这个问题有没有解决,自定义的策略好像不起作用了,isAutoInstall 返回 false 没有任何作用,会自动弹出安装,我没有测试低版本的手机。

@Semenry
Copy link

Semenry commented Apr 10, 2019

是因为DefaultCheckCallback如下代码的原因: current为空,直接触发下载,没有调起dialog,但是DefaultCheckCallback为final没办法继承,也没有set方法,所以~
Activity current = ActivityManager.get().topActivity();

        if (Utils.isValid(current)
                && builder.getUpdateStrategy().isShowUpdateDialog(update)) {
            Dialog dialog = notifier.create(current);
            SafeDialogHandle.safeShowDialog(dialog);
        } else {
            notifier.sendDownloadRequest();
        }

@rockscy
Copy link
Author

rockscy commented Apr 10, 2019

是的 我也找到原因了 , 是AcitivtyManager获取顶层activity为空造成的,重写下ActivityManager这个类就可以了

@Semenry
Copy link

Semenry commented Apr 10, 2019

ActivityManager.get().topActivity();这个代码无法获取到activity,希望更新

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants