isServiceRunning

fun Context.isServiceRunning(serviceClass: Class<*>?, checkForeground: Boolean = false): Boolean