android-components / / asForegroundServicePendingIntent


@JvmName("createForegroundServicePendingIntent") fun <ERROR CLASS>.asForegroundServicePendingIntent(context: <ERROR CLASS>, requestCode: Int): <ERROR CLASS> (source)

Create a PendingIntent instance to run a certain service described with the Intent.

This method will allow you to launch a service that will be able to overpass background service limitations introduced in Android Oreo.


context - an Intent to start a service.