StephGit / EazyTime

Android app for time tracking
MIT License
2 stars 2 forks source link

Service IllegalStateException #43

Closed StephGit closed 5 years ago

StephGit commented 5 years ago

IllegalStateException: Not allowed to start service Intent:


Handling a high-priority Firebase Cloud Messaging (FCM) message.
Receiving a broadcast, such as an SMS/MMS message.
Executing a PendingIntent from a notification.
Starting a VpnService before the VPN app promotes itself to the foreground.

-> Gelöst mit JobIntentService

Anschliessend: java.lang.IllegalStateException: Cannot invoke observeForever on a background thread


-> Handler(Looper.getMainLooper()).post {
// observeForever here
 }```