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
Setting | Type | Default |
---|---|---|
| This is a string containing a standard HEX color code. |
|
Composer config
Setting | Type | Default |
---|---|---|
| The string that appears in the Orb's text input box. |
|
| The bot can specify that the Orb's text input |
|
| The text of file upload button |
|
| This text appears in the confirmation dialog just before |
|
| The text of the image/photo upload button. |
|
| The text of the button to open the phone's camera |
|
| The text of the button to open the phone's image |
|
Splash
Setting | Type | Default |
---|---|---|
| The text that is displayed in the Orb's initial splash screen. |
|
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).
Updated 15 days ago