Chào mọi người hiện em đang muốn chạy hai foreground service cùng lúc,service đầu em chạy dùng startForegroundService
,code đây ạ:
private fun actionOnService(action: Actions) {
if (getServiceState(this) == ServiceState.STOPPED && action == Actions.STOP) return
Intent(this, EndlessService::class.java).also {
it.action = action.name
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
log("Starting the service in >=26 Mode")
startForegroundService(it)
Liệu để chạy thêm một service nữa thì em phải làm sao ạ. Cảm ơn mọi người giúp đỡ. Em hỏi thêm trên stack