Find startService(...) calls

Proprietary

On API 26+ background apps cannot call startService(...) — the system throws IllegalStateException. For services that must run while the app is backgrounded, call ContextCompat.startForegroundService(context, intent) and post a notification within five seconds. For one-shot work, use WorkManager instead.

org.openrewrite.kotlin.android.FindStartService$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.android.FindStartService$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.