IBcmBranding

The SDK brading configuration interface (IBcmBranding) is an optional interface. The interface is for an object to be assigned to IBcmGlobalConfig's branding property. It allows you to configure branding of the SDK.

Please refer to the Branding page for a high-level overview.

Interface

Kotlin:

open class IBcmBranding {

    /**
     * Tint color for control bars, navigation bars, and buttons.
     */
    open fun universalPrimary(
        context: Context
    ): Int = adjustBrightness(Color.parseColor("#00a8d0"), 0.32f)

    /**
     * Finger live preview. Initial bounding box color.
     */
    open fun fingerLiveBoundingBoxInitial(
        context: Context
    ): Int = Color.WHITE

    /**
     * Finger live preview. Bounding box color when the configured score threshold is reached.
     */
    open fun fingerLiveBoundingBoxScoreReached(
        context: Context
    ): Int = Color.GREEN

    /**
     * Finger live preview. Bounding box color for fingers which are not selected.
     */
    open fun fingerLiveUnselected(
        context: Context
    ): Int = adjustAlpha(Color.GRAY, 0.32f)

    /**
     * Finger selection view. Start button color.
     */
    open fun fingerSelectedStartButton(
        context: Context
    ) = Color.parseColor("#00a8d0")

    /**
     * Finger selection view. Finger is selected color.
     */
    open fun fingerSelected(
        context: Context
    ) = Color.parseColor("#00a8d0")

    /**
     * Finger selection view. Finger is unselected color.
     */
    open fun fingerUnselected(
        context: Context
    ) = Color.RED

    /**
     * Image, which is always displayed at the top right of the scan screen.
     */
    open fun scanLogo(
        context: Context
    ): Int = R.drawable.bcm_scan_logo

}

Example

Kotlin:

class BcmBranding() : IBcmBranding() {

    override fun universalPrimary(
        context: Context
    ): Int = Color.parseColor("#00a8d0")

    open fun scanLogo(
        context: Context
    ): Int = R.drawable.bcm_scan_logo

    ...

}

Java:

public class BcmBranding extends IBcmBranding {

    public BcmBranding() {
        super();
    }

    @Override
    public int universalPrimary(
        Context context
    ) {
        return Color.parseColor("#00a8d0");
    }

    @Override
    public int scanLogo(
        Context context
    ) {
        return R.drawable.bcm_scan_logo;
    }

    ...

}

Initialize the branding config in the IBcmGlobalConfig class

Kotlin:

class BcmGlobalConfig() : IBcmGlobalConfig() {

    override fun branding(): IBcmBranding = BcmBranding()

}

Java:

public class BcmGlobalConfig extends IBcmGlobalConfig {

    public BcmGlobalConfig() {
        super();
    }

    @Override
    public IBcmBranding branding() {
        return new BcmBranding();
    }

}

See Also

results matching ""

    No results matching ""