Config
Parameters
If any of these parameters are set to null/nil then the default values
will be used.
Theme config
| Setting | Type | Default |
|---|---|---|
brandColor | This is a string containing a standard HEX color code. | #4989EA |
Composer config
| Setting | Type | Default |
|---|---|---|
placeHolderText | The string that appears in the Orb's text input box. | Type a message |
collapsedPlaceHolderText | The 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? |
fileButtonText | The text of file upload button | File |
fileSendText | This 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 theend | Send |
imageButtonText | The text of the image/photo upload button. | Photo |
cameraButtonText | The text of the button to open the phone's camera | Camera |
galleryButtonText | The text of the button to open the phone's image gallery. | Gallery |
Splash
| Setting | Type | Default |
|---|---|---|
readyText | The 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);
}
NoteYou need to make sure that the Orb is ready before you call the
configuremethod 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)
}
NoteYou need to make sure that the Orb is ready before you call the
configuremethod 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).
Updated 10 months ago
