Sensorberg Firebase Messaging Service
Firebase service that receives Sensorberg push messages.
Since
1.9.0
You need to extend this service and register it in your AndroidManifest.xml
All methods are invoked on a background thread, and may be called when the app is in the background or not open.
You should override onNewToken and call UserManager.registerPushNotificationToken("token").
It is your responsibility that the token is successfully passed to the Sensorberg backend. If the request fails you should try again (maybe by implementing a Worker).
onNewToken can be called before the Sensorberg SDK is initialized. So you could call UserManager.registerPushNotificationToken("token") after successful login as well.
Constructors
Functions
The service is not re-created when we reload all koin dependencies So it would have outdated dependencies. To avoid this we are registering a koin listener and update those dependencies when required.
Called when a push notification could be parsed.