AndroidAutoSize
AndroidAutoSize copied to clipboard
集成之后,app进入后台,点击桌面图标,app就会重启,可以确定app没有被杀掉
集成autosize之后,app进入后台,然后点击桌面图标,app就会重新进入启动activity,已经在多个品牌手机上测试都是这种情况(华为小米魅族), app内部没有其他适配相关代码
是启动页面SplashActivity.onCreate()中添加:
if (!isTaskRoot()) {
final Intent intent = getIntent();
final String intentAction = intent.getAction();
if (intent.hasCategory(Intent.CATEGORY_LAUNCHER) && intentAction != null && intentAction.equals(Intent.ACTION_MAIN)) {
finish();
return;
}
}
断点或者使用 adb shell dumpsys activity 命令看下任务栈,看看是怎么启动的
使用 官方 Demo 或者自己写个 Demo 在对应机型上看看能否重现,如果没有重现,检查下是否是业务代码和框架代码共同导致的这个问题