Blankj / Blankj/AndroidUtilCode
UtilsActivityLifecycleImpl.isAppForeground()是否后台的判断初始值是不是错了
- Dominant language
- Java
- Stars
- 33.6k
- Forks
- 10.6k
- PR merge metrics
- No merged PRs in 30d
Description
## 描述 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在后台
}
}
}
## 截图

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.