Toolbox
Toggle table of contents
android
Target filter
android
Switch theme
Search in API
Skip to content
Toolbox
service
/
com.michaelflisar.toolbox.service
/
ForegroundServiceUtil
Foreground
Service
Util
object
ForegroundServiceUtil
Members
Functions
bind
Link copied to clipboard
inline
fun
<
T
:
Service
>
bind
(
context
:
Context
,
connection
:
ServiceConnection
,
mode
:
Int
)
is
Running
Link copied to clipboard
inline
fun
<
T
:
Service
>
isRunning
(
context
:
Context
)
:
Boolean
start
Link copied to clipboard
inline
fun
<
T
:
Service
>
start
(
context
:
Context
,
action
:
String
=
ServiceConstants.ACTION_START_SERVICE
,
block
:
Intent
.
(
)
->
Unit
)
stop
Link copied to clipboard
inline
fun
<
T
:
Service
>
stop
(
context
:
Context
)
unbind
Link copied to clipboard
fun
unbind
(
context
:
Context
,
connection
:
ServiceConnection
)