Skip to content

ActivationScreen Layout

If the discovery service based or the QR code based onboarding will be supported, then the welcome screen will display only the Get Started button but will not start the onboarding directly. When the end user taps on the Get Started button a new Activation screen will be displayed first. The layout of the Activation screen depends on the OnboardingType set on the launch screen activity.

  • If the DISCOVERY_SERVICE_ONBOARDING was selected, then it displays the email address edit box in addition the Start button initiating the onboarding. (The discovery service based onboarding will be enabled only if some email address is entered first into the email address edit box.)
  • If the BARCODE_ONBOARDING was selected, then it displays only a button which will start the QR code reader activity.
  • If the ACTIVATION_MAIL_ONBOARDING was selected, then there is no button in it, but displays only info messages for the end user, and an option graphical element (image).
  • If the BARCODE_OR_DISCOVERY_SERVICE_ONBOARDING was selected, then it displays two buttons, the first one starts the activation screen again but in DISCOVERY_SERVICE_ONBOARDING mode, and the second one starts the QR code reader activity the same way as we did in case of BARCODE_ONBOARDING mode.

The layout of the ActivationScreenActivity

The activation screen contains:

  • a title
  • an instruction,
  • an optional email address field (displayed only for discovery service based onboarding),
  • a primary button used to start the discovery service based onboarding,
  • a secondary button used to start the QR code reader activity.

All the mentioned labels/buttons can be customized via the Settings configuration, that is you can overwrite them via the corresponding set methods of the ActivationSettings class. The ActivationSettings class can be instantiated with default constructor. The set methods should be called before calling the saveToIntent method, which saves the configuration into an Intent. Finally, this intent should be used when starting the LaunchScreenActivity via the startActivityForResult method.

Customizing the Activation screen

You can use the ActivationSettings object for customize the labels and buttons of the activation screen. The following options are available:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
    /**
     * Sets the class name of the action handler used by the activation screen.
     *
     * @param actionHandler the class name of the action handler.
     */
    public void setActionHandler(String actionHandler) {
        this.actionHandler = actionHandler;
    }

    /**
     * Sets the title of the activation screen.
     *
     * @param activationTitle the title of the screen
     */
    public void setActivationTitle(String activationTitle) {
        this.activationTitle = activationTitle;
    }

    /**
     * Sets the instruction description on the activation screen.
     *
     * @param activationInstruction the instruction
     */
    public void setActivationInstruction(String activationInstruction) {
        this.activationInstruction = activationInstruction;
    }

    /**
     * Sets the discovery service button title to use on the activation screen
     * (in case of OnboardingType.BARCODE_OR_DISCOVERY_SERVICE_ONBOARDING).
     *
     * @param activationNextTitle the next button title
     */
    public void setActivationNextTitle(String activationNextTitle) {
        this.activationNextTitle = activationNextTitle;
    }

    /**
     * Sets the scan qr code button title to use on the activation screen
     * (in case of OnboardingType.BARCODE_OR_DISCOVERY_SERVICE_ONBOARDING
     * or OnboardingType.BARCODE_ONBOARDING).
     *
     * @param activationScanTitle the scan button title
     */
    public void setActivationScanTitle(String activationScanTitle) {
        this.activationScanTitle = activationScanTitle;
    }

    /**
     * Sets the qr code reader class for custom qr code reader implementation.
     *
     * @param qrReaderClass the class name of the custom implementation's activity
     */
    public void setQRReaderClass(String qrReaderClass) {
        this.activationQRReaderClass = qrReaderClass;
    }

    /**
     * Sets the resource id to use as optional
     * graphical element on activation screen
     * (in case of OnboardingType.ACTIVATION_MAIL_ONBOARDING).
     *
     * @param image the resource id of the image
     */
    public void setActivationImage(int image) {
        this.activationImage = image;
    }

    /**
     * Sets the email address to use on activation screen
     * (in case of OnboardingType.ACTIVATION_MAIL_ONBOARDING).
     *
     * @param activationEmail the email address where the activation mail was sent to.
     */
    public void setActivationEmail(String activationEmail) {
        this.activationEmail = activationEmail;
    }

    /**
     * Sets the hint of the email address field in case of discovery service based onboarding
     * (that is in case of OnboardingType.DISCOVERY_SERVICE_ONBOARDING).
     *
     * @param activationEmailHint the hint of the email address field
     */
    public void setActivationEmailHint(String activationEmailHint) {
        this.activationEmailHint = activationEmailHint;
    }

    /**
     * Sets the discovery service button title to use on the activation screen
     * (in case of OnboardingType.DISCOVERY_SERVICE_ONBOARDING).
     *
     * @param activationStartTitle the start button title
     */
    public void setActivationStartTitle(String activationStartTitle) {
        this.activationStartTitle = activationStartTitle;
    }

Please note that the settings of the Activation screen should be applied on the Intent used for starting the welcome screen (NOT activation screen). The activation screen will never be called directly by the app, but it will be started by the welcome screen's activity. The settings intended for the activation screen will be automatically forwarded into the intent of the activation screen.