Config

Orb Mobile SDK settings

Parameters

If any of these parameters are set to null/nil then the default values
will be used.

Theme config

SettingTypeDefault
brandColorThis is a string containing a standard HEX color code.#4989EA

Composer config

SettingTypeDefault
placeHolderTextThe string that appears in the Orb's text input box.Type a message
collapsedPlaceHolderTextThe bot can specify that the Orb's text input
box can be hidden in BFML. This text will appear when the Orb's text input
is hidden and the bot did not specify any placeholder text in BFML.
Have something else to say?
fileButtonTextThe text of file upload buttonFile
fileSendTextThis text appears in the confirmation dialog just before
the user sends their file to the bot/agent. Be sure to always leave a
trailing space because the Orb appends the file name and a ? mark at the
end
Send
imageButtonTextThe text of the image/photo upload button.Photo
cameraButtonTextThe text of the button to open the phone's cameraCamera
galleryButtonTextThe text of the button to open the phone's image
gallery.
Gallery
Splash
SettingTypeDefault
readyTextThe text that is displayed in the Orb's initial splash screen.Ready to start

Configure Orb in Android

Here is a code snippet of a complete configuration object in Java:

orb.configure(new OrbConfig(
        new OrbTheme(
                "#00d9d9"  // brandColor
        ),
        new OrbComposer(
               "Type your message",  // placeHolderText
               "Message",  // collapsedPlaceHolderText
               "File",  // fileButtonText
               "Send file ",  // fileSendText
               "Photo",  // imageButtonText
               "Camera",  // cameraButtonText
               "Gallery"  // galleryButtonText
        ),
        new OrbSplash(
                "Ready to connect"  // readyText
        )
));

if (!orb.ready) {
    orb.setOnReadyListener(new Orb.ReadyListener() {
        public void onReady() {
            Log.d(TAG, "Orb runtime ready");
            orb.configure(config);
        }
    });
} else {
    orb.configure(config);
}

📘

Note

You need to make sure that the Orb is ready before you call the
configure method otherwise your config parameters will not be saved.

Configure Orb in iOS

Here is a code snippet of a complete configuration object in Swift:

let config = OrbConfig(
    theme: OrbTheme(
        brandColor: "#00d9d9"
    ),
    composer: OrbComposer(
        placeholderText: "Type your message",
        collapsePlaceholderText: "Message",
        fileButtonText: "File",
        fileSendText: "Send ",
        imageButtonText: "Photo",
        cameraButtonText: "Camera",
        galleryButtonText: "Gallery"
    ),
    splash: OrbSplash(
        readyText: "Orb is now ready"
    )
)
if !orb.ready {
    orb.onReady { [unowned orb] in
        orb.configure(config: config)
    }
} else {
    orb.configure(config: config)
}

📘

Note

You need to make sure that the Orb is ready before you call the
configure method otherwise your config parameters will not be saved.

Configure Orb in Flutter

To configure Orb in Flutter, follow both Android and iOS instructions above (implement in native code).