UnifiedPush: emit error when registration fails.
Note that I did not manage to have the method `onRegistrationFailed` invoked. If the network is not available for instance, unregistering the previous pusher will fail first.
This commit is contained in:
parent
6b7e8f72f5
commit
f9c0b9e8bb
16 changed files with 208 additions and 23 deletions
|
|
@ -10,6 +10,7 @@ package io.element.android.libraries.push.api
|
|||
|
||||
import io.element.android.libraries.matrix.api.MatrixClient
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.push.api.history.PushHistoryItem
|
||||
import io.element.android.libraries.pushproviders.api.Distributor
|
||||
import io.element.android.libraries.pushproviders.api.PushProvider
|
||||
|
|
@ -73,4 +74,9 @@ interface PushService {
|
|||
* Reset the battery optimization state.
|
||||
*/
|
||||
suspend fun resetBatteryOptimizationState()
|
||||
|
||||
/**
|
||||
* Notify the user that the service is un-registered.
|
||||
*/
|
||||
suspend fun onServiceUnregistered(userId: UserId)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue