Answers for "how to check if app is open java android"

2

android check if app is running

private fun isAppRunning() : Boolean {
        val services = (getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager).runningAppProcesses
        return services.firstOrNull{it.processName.equals(packageName,true)} != null
    }
Posted by: Guest on August-03-2020

Code answers related to "how to check if app is open java android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language