tryPickDistributor
Try to pick a distributor opening the deeplink "unifiedpush://link", ignoring the default one
It uses the OS dialog to select the applications
External distributors will be favored over embedded distributors.
Doesn't work with Distributors that don't support AND_3 specs
Be aware that this function starts a new translucent activity in order to get the result of the distributor activity. You may prefer to use LinkActivityHelper directly in your own activity instead.
Usage
Kotlin:
tryPickDistributor(context) { success ->
if (success) {
//TODO: register
}
}Content copied to clipboard
Java:
UnifiedPush.tryPickDistributor(context, success -> {
if (success) {
//TODO: register
}
return null;
});Content copied to clipboard
Parameters
context
Must be an activity, or it will fail and the callback will be called with false
callback
is a function taking a Boolean as parameter. This boolean is true if the registration using the deeplink succeeded.