Compruebe de Android si la aplicación se está ejecutando

private fun isAppRunning() : Boolean {
        val services = (getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager).runningAppProcesses
        return services.firstOrNull{it.processName.equals(packageName,true)} != null
    }
Witty Worm