[英]How to know that the current running app is some messaging app in android
[英]How to get Current running app if my current app is in background android
由于不推荐使用 getRunningTasks(1),我可以使用什么来替代它
请考虑以下选项
val tasks = context.getSystemService(ACTIVITY_SERVICE).
appTasks
for (task in tasks) {
Log.d(TAG, "stackId: " + task.taskInfo.stackId)
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.