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

UtilsActivityLifecycleImpl.isAppForeground()是否后台的判断初始值是不是错了 #1784

Open
Bter opened this issue Aug 8, 2023 · 0 comments
Assignees
Labels

Comments

@Bter
Copy link

Bter commented Aug 8, 2023

描述 Bug

APP处于后台,点击通知栏启动Activity前判断了一下是否处于前台,UtilsActivityLifecycleImpl.isAppForeground()返回true;但实际是处于后台的。

  • AndroidUtilCode 的版本:1.31.1
  • 出现 Bug 的设备型号:
  • 设备的 Android 版本:

相关代码

public void onReceive(Context context,final Intent intent) {
String action = intent.getAction();
LogUtil.i(">>>>>>>>>>>>>" + action);
if(ACTION_OPEN_SCREEN.equalsIgnoreCase(action)){
if(!AppUtils.isAppForeground()){
//APP在后台
}
}
}

截图

image

@Bter Bter added the bug label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants