Ensure that a PushProvider is available on a device before using it.
It help to fallback to UnifiedPush (if available) if the PlayServices are not installed on the device.
This commit is contained in:
parent
e2c9389d36
commit
7498c148f1
5 changed files with 45 additions and 1 deletions
|
|
@ -38,7 +38,9 @@ class DefaultPushService @Inject constructor(
|
|||
}
|
||||
|
||||
override fun getAvailablePushProviders(): List<PushProvider> {
|
||||
return pushProviders.sortedBy { it.index }
|
||||
return pushProviders
|
||||
.filter { it.isAvailable() }
|
||||
.sortedBy { it.index }
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue