SelectDistributorDialogsBuilder

open class SelectDistributorDialogsBuilder(context: Context, unifiedPushFunctions: UnifiedPushFunctions)

Main dialog builder, use run to select a distributor and register

Extend and override functions or attributes if needed.

Parameters

context

Context for fetching resources.

unifiedPushFunctions

UnifiedPush functions to interact with the distributors.

Constructors

Link copied to clipboard
constructor(context: Context, unifiedPushFunctions: UnifiedPushFunctions)

Properties

Link copied to clipboard
open var instances: List<String>

List of instances to request registration for.

Link copied to clipboard

Use saved distributor if available.

Link copied to clipboard

Use default distributor if available.

Link copied to clipboard

Contains content of the different dialogs.

Functions

Link copied to clipboard
open fun onDistributorSelected(distributor: String)

Called when a distributor is selected. By default, it calls UnifiedPushFunctions.saveDistributor then UnifiedPushFunctions.registerApp for each instance.

Link copied to clipboard
open fun onManyDistributorsFound(distributors: List<String>)

Called when many distributors are found. By default, it shows a dialog to ask which distributor to pick with RegistrationDialogContent.chooseDialog content.

Link copied to clipboard

Called when no distributor are found. By default, it shows a dialog with RegistrationDialogContent.noDistributorDialog content.

Link copied to clipboard
Link copied to clipboard
fun run()

Show a dialog if needed to ask user's distributor and request registration for all instances

Link copied to clipboard

Select distributor without trying to use the user's default one.

Link copied to clipboard

Whether the dialog with the IntroDialog should be shown to the user.

Link copied to clipboard
open fun showIntro()
Link copied to clipboard
open fun tryUseDefault()