caffeinalab / ti.goosh

GCM/FCM module for Titanium.
MIT License
52 stars 34 forks source link

Fixed notifications not displayed when the app is in background state #115

Closed Jei closed 5 years ago

Jei commented 5 years ago

Android 26 introduced radical changes to the way services are handled. The details are in the official page here: https://developer.android.com/about/versions/oreo/background#services The result is that Ti.Goosh currently throws a java.lang.IllegalStateException whenever a notification is received while the app is closed or considered as "in background" by the system. I solved this problem by starting our IntentService class through JobScheduler.

Solves #114 and #109

Jei commented 5 years ago

@Jei @kopiro