A short post on crash that'll happen if we invoke
#service #thread #crash
startForegroundService and then it'll take us too long to invoke startForeground. This guy's solution is to wait for the main thread first and only then to launch the service.#service #thread #crash
Medium
The “misbehaving” foreground service in Android
How blocking the main thread can lead to application crashes.