App Development Settings
Here is a reference to the settings you may use in the development of the app for your Android channel.
Network Configuration
Property Name | Description | Required? | Default Value |
---|---|---|---|
channelId |
The ID of the Oracle Android channel. | Yes | N/A |
userId |
The unique identifier for user. This value gets initialized by the SDK if not provided. | No | A randomly generated value |
authTokenProvider |
An instance of AuthenticationTokenProvider, which is used to generate a new token whenever the SDK needs to establish a new connection using a client authentication-enabled channel and when existing token is expired. | Yes | N/A |
Feature Flags
Property | Description | Required? | Default Value | |
---|---|---|---|---|
actionsLayout |
An object of type ActionsLayout
which sets the layout orientation of local, global, card and form
actions.
|
No | new
ActionsLayout(LayoutOrientation.VERTICAL,
LayoutOrientation.VERTICAL, LayoutOrientation.VERTICAL,
LayoutOrientation.VERTICAL) |
|
disablePastActions |
A field for disabling the button clicks on the
messages that a user has already interacted with. The allowed values
are all , none , and
postback . The behavior enabled by this property
is independent of the digital assistant-level configuration for
disabling the selection of past actions. You
need to set the two separately.
|
No | all |
|
displayPreviousMessages |
Enables or disables the display of previous messages
after the SDK has been re-initialized. When set to
false , the previous messages are not displayed
for the user after re-initialization of SDK.
|
No | true |
|
enableAgentSneakPreview |
Sends the user-entered text along with the typing status to the agent. | No | false |
|
enableArrowsForHorizontalCards |
Enables navigation arrows for the horizontal card
view when set to true , but disables them when set
to false .
|
No | false |
|
enableAttachment |
Enables attachment sharing in the chat view. When set
to true , you can restrict items that are available
in the share menu popup using shareMenuItems .
This setting is deprecated in Release 22.02. Use
|
No | true |
|
enableAttachmentSecurity |
When set to true , extra headers are
passed to the attachment upload requests to ensure that they can't
be downloaded without passing a valid signed JWT token as an
authorization header.
Note: Do not enable this setting if the skill connects to an ODA instance that's Version 20.08 or runs on any version prior to 20.08. This property only applies to client auth-enabled connections to Versions 20.12 and higher of the ODA platform. |
No | false |
|
enableClearMessage |
Enables the clear message button in the header of the chat view. | No | false |
|
enableDefaultClientResponse |
When set to true , the client
displays default responses when the skill response has been delayed,
or when there's no response from the skill.
|
No | false |
|
enableEndConversation |
Enables the user to end the conversation and reset the chat session. It also clears the local conversation history, disconnects from the chat server and closes the activity | No | true |
|
enableNotification |
Enables or disables new message notifications from
the SDK when the chat application is running in the background. The
SDK won't provide any notifications when you set this flag to
false .
|
No | true |
|
enableNotificationSound |
Enables the notification sound on new skill messages
while the chat view is open. This feature only applies when
enableNotificationSoundSetting is set to
false .
|
No | true |
|
enableNotificationSoundSetting |
Enables the notification sound setting button in the chat view header. | No | false |
|
enableSendTypingStatus |
Sends the typing status of the user to the live agent. | No | false |
|
enableSpeechRecognition |
Enables the speech recognition service to convert
user voice to text messages. Set this property to
true to use the
enableSpeechRecognitionAutoSend
property.
|
No | false |
|
enableSpeechRecognitionAutoSend |
When
enableSpeechRecognitionAutoSend is set to
true (the default), the user's speech response
is automatically sent to the chat server (and displays as a sent
message in the chat window). When set to false , the
user's speech response is rendered in the message text field before
it's sent to the chat server so that the user can modify it before
sending it manually, or delete the message.
This
functionality is only available when
|
No | true |
|
enableSpeechSynthesis |
Enables the skill's audio response button in the header of the chat view. When the button is in the unmute state, the skill's responses are read aloud. | No | false |
|
enableTimestamp |
Enables the timestamp for messages. | No | true |
|
googleMapsApiKey |
The Google Maps API key that’s used to display a location preview image for Location messages. | No | N/A | |
initSpeechSynthesisMuted |
This flag, which is only applicable when
enableSpeechSynthesis is true ,
determines whether the skill's audio response button will be active
(unmute) by default initially, or muted. By default, it is set to
true , where the button is muted.
|
No | true |
|
initUserHiddenMessage |
A user text message that's used to initiate a conversation. This message, which is sent when chat view is ready, does not actually display in the chat. | No | N/A | |
initUserProfile |
Initializes the user profile before the conversation
starts. The profile payload must be of type User .
The profile is updated before sending the value in
initUserHiddenMessage .
|
No | N/A | |
linkHandler |
A field used to set link handler for opening links,
either in a webview or a browser.
WebviewLinkHandlerType is an enum with two
values: BROWSER and
WEBVIEW .
|
No | WebviewLinkHandlerType.BROWSER |
|
messageModifierDelegate |
An instance of type
MessageModifierDelegate which is used to
receive callbacks before certain events in the conversation.
|
No | N/A | |
multiLangChat |
Enables the chat widget to both detect a user's language and allow the user to select a preferred language from a dropdown menu in the header. Multi-Lingual Chat describes how create this menu. | No | ||
notificationCustomizer |
An instance of the NotificationCustomizer
class which is used to customize notifications received from
SDK.
|
No | N/A | |
reconnectMaxAttempts |
The number of attempts made by the chat widget to reconnect when the initial connection fails. | No | 5 |
|
saveClickedImagesInGallery |
When set to true (the default), an
image captured by the skill users using the camera will be saved to
the gallery and will be uploaded directly to the skill as an
attachment. If you don't want the images saved to the gallery, then
set saveClickedImagesInGallery to
false .
|
No | true |
|
shareMenuItems |
Restricts the items that display in the share menu
item and customizes the menu's icons and labels. To configure these
items, pass an ArrayList of Objects to
shareMenuItems . The Arraylist objects can
either be ShareMenuItem enum values that are mapped
to the share menu items or a ShareMenuCustomItem
object. To use this flag, you must set
enableAttachment to
true .
|
No | N/A | |
showBotAvatar |
Enables the display of the skill's avatar icon beside the skill's messages. | No | false |
|
showConnectionStatus |
Enables the connection status to display in the chat view header. | No | false |
|
showPersonAvatar |
Enables the display of the skill’s avatar icon
beside the skill’s messages and on the notifications. If your skill
has live agent integration, setting this flag to
true displays agent’s avatar icon beside the
agent’s messages and on the notifications.
|
No | false |
|
showTypingIndicator |
Enables the typing indicator to display while waiting for skill's response. | No | true |
|
showUserAvatar |
Enables the display of a user avatar icon beside a user messages. | No | false |
|
speechLocale |
The expected locale of the user's speech that's used
for voice recognition. The supported locales are Australia-English
(en-au ), UK-English (en-gb ),
French (fr-fr ), German (de-de ),
Indian-Hindi (hi-in ), Indian-English
(en-in ), Italian (it-it ),
Brazilian Portuguese (pt-br ), Spanish
(es-es ), and the default, US-English
(en-us ). Call the
Bots.setSpeechLocale(<locale>) API to set
the speech locale dynamically. Voice recognition will not work if an
unsupported locale has been passed.
|
No | "en-us" |
|
speechSynthesisService |
An instance of the SpeechSynthesisService that's used to inject
a text to speech (TTS) service. Applicable only if
enableSpeechSynthesis is set to
true .
|
No | N/A | |
speechSynthesisVoicePreferences |
Configures the language and voice that read the
skill's messages aloud by taking a list of instances that are of
type SpeechSynthesisSetting as its parameter. If
the device does not support the preferred voice, then the default
voice for the preferred language is used instead. When neither the
preferred voice or language are supported, then the default voice
and language are used.
|
No | N/A | |
subtitle |
Sets the subtitle of the chat view,
which is displayed below the title on the chat view header. If the
subtitle flag is set and either (or both) the
showConnectionStatus ,
showTypingIndicator are set to
true , then the subtitle is displayed instead of
either the connection status or the typing indicator.
|
No | N/A | |
timestampFormat |
Formats the timestamps that display in the messages.
It can accept a string of format tokens like
'mm:ss:a' . Refer to the Android
documentation for information about valid timestamp
patterns
|
No | N/A | |
timestampType |
If you enable timestamps by setting
enableTimestamp to true , you
can use set a relative timestamp that appears only on the latest
message by setting timestampType: 'relative' .
|
N/A | ||
title |
Sets the title in the header of the chat view. | No | N/A | |
typingIndicatorTimeout |
Sets the number of seconds after which the typing indicator is automatically removed if the chat view has not yet received the response. | No | 30 | |
typingStatusInterval |
Sets the interval, in seconds, to throttle the typing status that's sent to the live agent. | No | 3 |
|
WebViewConfig |
Sets the attributes of the in-widget webview, such as its size (partial or full) or customizations to the clear button. Customizations to clear button inside the webview can also be done. | No | Sets the configuration settings for of the webview. | |
youtubeApiKey |
Supports the streaming of YouTube videos by setting the YouTube API key. | No | N/A |
Custom Colors
name
attributes for the <color>
elements in the res/values/colors.xml
file (located in the project's
app resources) using the the following keys. The following snippet demonstrates a
modifications of the color that's used for the background of the skill's message
(odaas_primary
) and the text color used in the skill's
(odaas_on_primary
) message while maintaining the default colors for
other
resources.<resources>
<color name="odaas_primary">#6699FF</color>
<color name="odaas_on_primary">#000000</color>
</resources>
Version 20.8.1 of the SDK resets the colors for prior versions. For example, if the background color of the action buttons in the existing implementation is
#418980
, then this will
be changed to the default color of odaas_action_background
(introduced in 20.8.1), which is #FFFFFF
. For implementations
created using versions prior to 20.8.1, you can set custom colors by updating the
res/values/colors.xml
file in your application. For
example:<resources>
<color name="odaas_action_background">#418980</color>
</resources>
Key | Description | Default Value |
---|---|---|
odaas_action_background |
The background color of the action and global action buttons. | #FFFFFF |
odaas_agent_avatar_background_color |
The background color used for the avatar layout when agent avatar is unavailable and the agent name initials display instead. | #A890B6 |
odaas_agent_avatar_text_color |
The text color used for the agent name initials that display inside the agent avatar layout. | #FFFFFF |
odaas_agent_name_text_color |
The text color used for the agent name that displays above the agent messages. | #A6161513 |
odaas_background |
The background color for the view. | #F5F4F2 |
odaas_bot_avatar_background |
The background color used for the skill's avatar. | #bdbdbd |
odaas_bot_avatar_background |
The background color of the skill avatar. | #bdbdbd |
odaas_card_background |
The background color of the card messages and their action buttons. | FFFFFF |
odaas_dialog_accent |
The color that's used for buttons and progress bars on the dialog window that is shown before clearing messages and while uploading attachments. | 161513 |
odaas_dialog_background |
The background color of the dialog window that is shown before clearing messages and while uploading attachments. | #FFFFFF |
odaas_dialog_box_negative_button_background |
The background color of the decline button that appears in the alert dialog box. | @android:color/transparent |
odaas_dialog_box_negative_button_text_color |
The text color of the decline button that appears in the alert dialog box. | #161513 |
odaas_dialog_box_positive_button_background |
The background color of the confirm button that appears in the alert dialog box. | #161513 |
odaas_dialog_box_positive_button_text_color |
The text color of the confirm button that appears in the alert dialog box. | #FFFFFF |
odaas_error |
The text color that's used in error messages. | @android:color/white |
odaas_footer_accent |
The border and cursor color of the input field in the footer. | #01579B |
odaas_footer_attach_button |
The color of the attachment button. | #161513 |
odaas_footer_background |
The background color of the footer. | #FFFFFF |
odaas_footer_buttons |
The background color of the interactive buttons in the footer, except for the send button. | 161513 |
odaas_footer_inline_send_button |
The color of the inline send button that appears within
the input field when enableSpeechRecognitionAutoSend is
set to true .
|
#161513 |
odaas_footer_input_background |
The background color of the input field in the footer. | #FFFFFF |
odaas_footer_mic_button |
The color of the mic button. | #161513 |
odaas_footer_send_button |
The color of send button. | #FFFFFF |
odaas_footer_send_button_background |
The background color of the send button. | #161513 |
odaas_header_buttons |
The background color of the interactive buttons in the header. | #FFFFFF |
odaas_on_action_background |
The text color used with the odaas_action_background color. | @android:color/black |
odaas_on_background |
The text color used with the
odaas_background color.
|
@android:color/black |
odaas_on_card_action_text |
The text color of the action buttons on the card. | @android:color/black |
odaas_on_card_description_text |
The text color used for the description of the card. | @android:color/white |
odaas_on_card_title_text |
The text color used for the title of the card. | @android:color/white |
odaas_on_dialog_background |
The text color used with the
odaas_dialog_background color on dialog windows.
|
@android:color/black |
odaas_on_footer_input_background |
The text color used with the
odaas_footer_input_background color in the
footer.
|
@android:color/black |
odaas_on_multichat_spinner_background |
The background color of the multi-language chat dropdown menu before the popup window opens. | #F1EFED |
odaas_on_multichat_spinner_popup_background |
The background color of the multi-language chat dropdown menu after the popup window opens. | #FFFFFF |
odaas_on_multichat_spinner_popup_border |
The border color of the multi-language chat dropdown menu items after the popup window opens. | #BDBDBD |
odaas_on_multichat_spinner_popup_text_color |
The text color used for the items in the multi-language chat dropdown menu. | @android:color/black |
odaas_on_multichat_spinner_text_color |
The text color for a selected item in the multi-language chat dropdown menu. | #161513 |
odaas_on_primary |
The text color that's used with the
odaas_primary color
|
#161513 |
odaas_on_primary_variant_dark |
The text color used with the
odaas_primary_variant_dark color.
|
#161513 |
odaas_on_primary_variant_light |
The text color used with the
odaas_primary_variant_light color.
|
@android:color/black |
odaas_on_secondary |
The text color used with the
odaas_secondary color.
|
#161513 |
odaas_on_secondary_variant_light |
The text color used with the
odaas_secondary_variant_light color.
|
@android:color/black |
odaas_on_speech_view_background |
The text color used with the
odaas_speech_view_background color in speech mode.
|
@android:color/white |
odaas_on_status_bar_transparent |
The background color of status bar when the webview is opened. | @android:color/transparent |
odaas_on_webview_header_background_redwood |
The background color of the in-widget webview header in the Redwood Theme mode | #201E1C |
odaas_person_avatar_background |
The background color of the user avatar. | #bdbdbd |
odaas_primary |
The primary branding color that's used for the background of the skill's message and for the background of the interactive buttons in the footer. | #FFFFFF |
odaas_primary_status_bar |
The color that's used in the status bar. | #DCD7D1 |
odaas_primary_variant_dark |
The dark variant of primary color that's used in app bar and in notifications. | #F1EFED |
odaas_primary_variant_light |
The light variant of the primary color that's used in the background for the skill's attachment messages. | #E4E1DD |
odaas_rating_star |
The color that indicates that a user has not yet selected a rating feedback button. | @android:color/white |
odaas_rating_star_fill |
The color that indicates that a user has selected a rating feedback button. | #DAA520 |
odaas_secondary |
The secondary branding color that's used for the background of the user messages background and for the background of the skill's action buttons. | #E4E1DD |
odaas_secondary_variant_dark |
The dark variant of the secondary color that's used for the background of user attachment messages. | #CCCCCC |
odaas_secondary_variant_light |
The light variant of the secondary color that's used in background for the actions buttons that have been disabled. | #BDBDBD |
odaas_selected_text_highlighted_color |
The color of the text that's highlighted for a copy or share operation. | #B6AFAF |
odaas_speech_view_background |
The background color of the footer in speech mode. | #FFFFFF |
odaas_speech_view_button |
The color of the cancel button in speech mode. | #161513 |
odaas_speech_visualizer_background |
The background color of the speech visualizer in speech mode. | #12000000 |
odaas_speech_visualizer_color |
The bar color of the speech visualizer in speech mode. | #5C926D |
odaas_timestamp_font_color |
The text color used with the
odaas_timestamp_header_background color in the
relative timestamp mode.
|
#5b5652 |
odaas_timestamp_header_background |
The background color used with the timestamp header in the relative timestamp mode. | #d3d3d3 |
Custom Text
name
attributes for <string>
elements in the app resource's
res/value/strings.xml
file using the following keys. For example,
to change the title of the chat view, define the odaas_bot_chat_title
key:<resources>
<string name="odaas_bot_chat_title">Support</string>
</resources>
In
this example, only the chat title has been changed. The other string resources maintain
their default values. Key | Description | Default Value |
---|---|---|
odaas_bot_chat_title |
The title of the chat view that's displayed in the
chat view header. This resource is used only when the
title feature flag is not set.
|
Digital Assistant |
odaas_bot_status_connected |
The status text that displays when the connection between chat view and the Oracle Chat Server has been established. | Connected |
odaas_bot_status_connecting |
The status text that displays while the chat view connects to the Oracle Chat Server. | Connecting |
odaas_bot_status_disconnected |
The status text that displays when the connection between the chat view and the Oracle Chat Server has closed. | Disconnected |
odaas_bot_status_responding |
The status text that displays while the user waits
for the skill's response.
This string is deprecated in Release 22.06. |
Responding... |
odaas_button_clear_label |
The text for the clear button in the webview. | DONE |
odaas_capture_photo |
The menu item text in the attachment popup that's used for sending photos captured by the device's camera which are to be uploaded to the server as attachments. | Capture Photo |
odaas_captured_image_folder |
The name of the folder inside the Pictures directory where images that have been clicked will be saved. If no customizations have been provided, then by default, the clicked images are saved inside the Camera folder of DCIM. | N/A |
odaas_clear_messages_dialog_button_no |
The action text that appears on the Clear Messages popup for a negative action. | No |
odaas_clear_messages_dialog_button_yes |
The action text that appears on the Clear Messages popup for a positive action. | Yes |
odaas_content_desc_attachment_loaded |
The content description for the attachment message after loading the attachment successfully. | Open attachment |
odaas_content_desc_attachment_loading |
The content description for the attachment message while the attachment is loading. | Loading attachment |
odaas_content_desc_attachment_loading_error |
The content description for the attachment message when the attachment fails loading. | Error in loading attachment |
odaas_content_desc_audio_pause |
The content description for the pause button of the audio player. | Pause audio |
odaas_content_desc_audio_play |
The content description for the play button of the audio player. | Play audio |
odaas_content_desc_button_attach
|
The tooltip that appears when a long press gesture has been detected on the attachment button. Also, the content description for the attachment button. | Upload Attachment |
odaas_content_desc_button_audio_response_off
|
The tooltip that appears when a long press gesture has been detected on the mute button for the audio response. Also, the content description for the mute button of the audio response. | Unmute |
odaas_content_desc_button_audio_response_on
|
The tooltip that appears when a long press gesture has been detected on the unmute button for the audio response. Also, the content description for the unmute button of the audio response. | Mute |
odaas_content_desc_button_back
|
The tooltip that appears when a long press gesture has been detected on the back button on the chat view header. Also, the content description for back button. | Navigate Up |
odaas_content_desc_button_cancel
|
The tooltip that appears when a long press gesture has been detected on the keyboard button that is shown while user’s voice message is being recorded. Also, the content description for the keyboard button. | Cancel |
odaas_content_desc_button_clear |
The tooltip that appears when a long press gesture has been detected on the clear button. Also, the content description for the clear button. | Clear Chat |
odaas_content_desc_button_download |
The tooltip that appears when a long press gesture has been detected on the download button. Also, the content description for the download button. | Download |
odaas_content_desc_button_end_conversation |
The content description for the end conversation button. | End Conversation |
odaas_content_desc_button_notification_sound_off
|
The tooltip that appears when a long press gesture has been detected on the mute button for the notification sound. Also, the content description for the mute button of the notification sound. | Turn On Notification Sound |
odaas_content_desc_button_notification_sound_on
|
The tooltip that appears when a long press gesture has been detected on the unmute button for the notification sound. Also, the content description for the unmute button of the notification sound. | Turn Off Notification Sound
|
odaas_content_desc_button_send |
The tooltip that appears when a long press gesture has been detected on the Send button. Also, the content description for the send button. | Send |
odaas_content_desc_button_speak |
The tooltip that appears when a long press gesture has been detected on the Microphone button. Also, the content description for the microphone button. | Speak |
odaas_content_desc_location_loaded |
The content description for the location message after loading the location preview image successfully. | Open Location in Maps |
odaas_content_desc_location_loading |
The content description for the location message while the location preview image is loading. | Loading location preview
image |
odaas_content_desc_location_loading_error |
The content description for the location message when the location preview image loading fails. | Error in loading location preview image. Tap
to reload image. |
odaas_content_desc_multi_lang_chat |
The text that appears along with the language detection icon in the overflow menu. | Select Language |
odaas_content_desc_read_status |
The content description for the tick mark
('✓' ) for read messages. This string appears
only when enableTimestamp is set to
true .
|
Read |
odaas_content_desc_video_pause |
The content description for the pause button of video player. | Pause video |
odaas_content_desc_video_play |
The content description for the play button of video player. | Play video |
odaas_content_timestamp_a_few_moments_ago |
The relative timestamp that displays ten seconds after the message has been received and before 60 seconds has elapsed since the last message was received. | a few moments ago |
odaas_content_timestamp_day |
The relative timestamp that displays every day since
the previous message was received. %1$s is replaced
by the number of days that have passed.
|
%1$sd ago |
odaas_content_timestamp_hour |
The relative timestamp that displays every hour for
the first 24 hours after the previous message was received.
%1$s is replaced by the number of hours that
have passed.
|
%1$shr ago |
odaas_content_timestamp_min |
The relative timestamp that displays every minute
since the last message was received. %1$s is
replaced by the number of minutes that have passed.
|
%1$smin ago |
odaas_content_timestamp_month |
The relative timestamp that displays every month
since the previous message was received. %1$s is
replaced by the number of months that have passed.
|
%1$smth ago |
odaas_content_timestamp_now |
The relative timestamp that displays for a new message. | Now |
odaas_content_timestamp_year |
The relative timestamp that displays each year after
the previous message was received. %1$s is replaced
by the number of years that have passed.
|
%1$syr ago |
odaas_default_greeting_message |
The default client greeting response that's
displayed when the skill response has not received within the number
of seconds set by defaultGreetingTimeout .
|
Hey, Nice to meet you! Allow me a moment to
get back to you. |
odaas_default_greeting_timeout |
The default timeout, in seconds, after which a default greeting message displays. | 5 |
odaas_default_sorry_message |
The default client response when the skill response
has not received a message within the number of seconds set by
typingIndicatorTimeout .
|
`I'm sorry, but I can't get the right
content right now. Please try again.` |
odaas_default_wait_message |
The default response that displays at the interval
when an actual skill response has not received. This interval is
set, in seconds, by
defaultWaitMessageInterval .
|
I'm still working on your request. Thank you
for your patience! |
odaas_default_wait_message_interval |
he default interval, in seconds, that the default wait message displays. | 5 |
odaas_dialog_text_clear_messages |
The text displayed within a popup that prompts the user for confirmation before clearing the messages. | Clear messages? |
odaas_download_dialog_message |
The message in the download dialog popup that displays when a user initiates a download from within the in-widget webview. | Do you want to save |
odaas_download_dialog_negative_button |
The text for download dialog's negative button that cancels a download that a user has initiated from within the in-widget webview. | Cancel |
odaas_download_dialog_positive_button |
The text for download dialog's negative button that confirms a download that a user has initiated from within the in-widget webview. | Yes |
odaas_download_dialog_title |
The title of the download dialog popup that displays when a user initiates a download from within the in-widget webview. | Download |
odaas_end_conversation_action_yes |
The text for the confirm button in the end session confirmation prompt. | Yes |
odaas_end_conversation_alert_message |
The message body of the end conversation confirmation prompt. | This will also clear your conversation
history. |
odaas_end_conversation_alert_no |
The text for the decline button in the end session confirmation prompt. | No |
odaas_end_conversation_alert_title |
The title of the end conversation confirmation prompt. | Are you sure you want to end the
conversation? |
odaas_error_in_capturing_photo |
The error message that's displayed when an error occurs while capturing a photo from the camera of the device. | Error in capturing photo. |
odaas_error_in_recording_audio |
The error message that's displayed when an error occurs while establishing connection to Oracle speech server. | Error in recording audio. Please try again
later. |
odaas_error_in_speech_recognition |
The error message that's displayed when no input, or too much input, is given in speech. | Speech Recognition Error. |
odaas_error_speech_unsupported_locale |
The error message that's displayed when a voice recording has been attempted and an unsupported speech locale has been configured for voice recognition. | The set speech locale is not supported. Can
not start recording. |
odaas_file_uploading_in_progress |
The text displayed within the popup while uploading a user's attachment to the Oracle Server. | Uploading file to
server..... |
odaas_hint_edit_text_user_message |
The placeholder text that appears in the user input field. | Type your message |
odaas_hint_text_view_speech_mode |
The placeholder text that appears in the text view of speech mode before the user starts speaking. | Speak your message |
odaas_no_messages_to_clear |
The message displayed when there are no messages to clear. | No messages to clear |
odaas_no_speech_error |
The status text that's displayed when the Chat Server cannot recognize a voice because no user input has been detected. | Could not detect the voice, no message
sent. |
odaas_notification_attachment_message |
The message that's displayed in the notification for
an attachment message that's received from the skill. The text for
%1$s is set to the Notification
title that's defined using the
NotificationCustomizer class, described in the
SDK (available from the ODA and OMC download
page ).
|
%1$s has sent you an Attachment
Message. |
odaas_notification_card_message |
The message that's displayed in the notification for
a Card message that's received from the skill. The text for
%1$s is set to the Notification
title that's defined using the
NotificationCustomizer class, described in the
SDK (available from the ODA and OMC download
page ).
|
%1$s has sent you a Card
Message. |
odaas_notification_card_message |
The message that is displayed in the notification for a card message received from the skill. | |
odaas_notification_fallback_message |
The fallback message that is displayed in the
notification for a message received from the skill. The text for
%1$s is set to the Notification
title that's defined using the
NotificationCustomizer class, described in the
SDK (available from the ODA and OMC download
page ).
|
%1$s has sent you a
Message. |
odaas_notification_fallback_message |
The fallback message that is displayed in the notification for a message received from the skill. | |
odaas_notification_intent |
The activity to open, when tapped by the user, on
notifications received from the SDK. The text for
%1$s is set to the Notification
title that's defined using the
NotificationCustomizer class, described in the
SDK (available from the ODA and OMC download
page ).
|
oracle.cloud.bots.mobile.ui.ConversationActivity |
odaas_notification_location_message |
The message that is displayed in the notification for
a location message received from the skill. The text for
%1$s is set to the Notification
title that's defined using the
NotificationCustomizer class, described in the
SDK (available from the ODA and OMC download
page ).
|
%1$s has sent you a Location
Message. |
odaas_page_loading |
The text within the popup while a page is loading inside a webview. | Please Wait...Page is
Loading. |
odaas_require_audio_recording_permission |
The error message that's displayed when users deny permission for recording the audio. | Audio recording permission is needed to
record audio |
odaas_require_download_to_storage_access_permission |
The error message that's displayed when users deny the storage access permission to save the downloaded file. | Storage access permission is needed to
download file |
odaas_require_location_permission |
The error message that's displayed when users deny permission to access their locations. | Location access permission is needed to
track location |
odaas_require_storage_access_permission |
The error message that's displayed when access to storage has been denied. | Storage access permission is needed to attach
files |
odaas_share_audio |
The menu item text in the attachment popup used for sharing audio file. | Share Audio |
odaas_share_file |
The menu item text in the attachment popup used for sharing a generic file. | Share File |
odaas_share_message_chooser_title |
The title of the application chooser that's displayed when user clicks the Share action. | Share using: |
odaas_share_visual |
The menu item text in the attachment popup used for sharing an image or video file. | Share Image/Video |
odaas_skill_message |
The skill message indicator for screen readers. It's spoken by screen readers before the skill response. The text is not displayed in the chat view. | Skill says: |
odaas_speech_to_text_dialog_placeholder |
The placeholder text displayed on the speech recognition popup before the user starts speaking. This property is deprecated in Release 20.8.1. From that release onward, the setting for this property will be ignored. | Listening..... |
odaas_star_rating |
The message that's read aloud when a user rating button has been clicked while the user is in accessibility mode. | Rate %1$s star |
odaas_too_much_speech_error |
The error message that's displayed when a user provides voice message that's too long to be recognized. | Too much voice input to recognize. Can not
generate recognized text. |
odaas_user_message |
The user message indicator for screen readers. It's spoken by screen readers before the user messages. | I say: |
Localization
name
attributes for the
<string>
elements in the app resource's
res/values-<your-language-code>/strings.xml
file with the
keys. For example, to localize the title of the chat view in English, define the
following in a file called
res/value-en/strings.xml
:<resources>
<string name="odaas_bot_chat_title">Support</string>
</resources>
To
localize the title in French, you'd add the following to a file called
res/value-fr/strings.xml
file:<resources>
<string name="odaas_bot_chat_title">Soutien</string>
</resources>
The
values for res/value/strings.xml
are used by default for the keys that
are not found in res/values-<your-language-code>/strings.xml
. For
these two examples, the default values would be used for the resources that are not
defined in either the res/value-fr/strings.xml
or
res/value-en/strings.xml
files.
Custom Icons
res/drawable
folder that have the following names.
Name | Description |
---|---|
ic_odaas_agent_avatar |
The avatar icon for the messages from the live agent.
This icon displays in notifications only when the
showBotAvatar feature flag is set to
true .
|
ic_odaas_bot_avatar |
The avatar icon for the skill's messages. This icon
displays on notifications only when the
showBotAvatar feature flag is set to
true .
|
ic_odaas_download |
The download icon that appears on the attachment message that's sent by the skill. |
ic_odaas_image_zoom |
The icon for the zoom control that appears on an image attachment message that's sent by the skill. |
ic_odaas_notification_app_icon |
The app icon displayed in the status bar and on notifications received from SDK library. |
ic_odaas_person_avatar |
The avatar icon for user messages. |
ic_odaas_rating |
The icon used for the feedback rating button. |
Set Feature Flags
Use the BotsConfiguration.BotsConfigurationBuilder
class to
initialize the BotsConfiguration
class.
BotsConfiguration.BotsConfigurationBuilder(String chatServerUrl, boolean clientAuthEnabled, Context context)
Parameters:chatServerUrl
– The URL to the Oracle Chat and Attachment Server. This cannot be null.clientAuthEnabled
- Determines whether the channel's client authentication settings are enabled or disabled.context
– The application context. This cannot be null.
BotsConfiguration botsConfiguration = new BotsConfiguration.BotsConfigurationBuilder(<SERVER_URI>, false, getApplicationContext())
BotsConfiguration.BotsConfigurationBuilder(String chatServerUrl, Context context)
– This can be used to establish a connection to channel with client authentication enabled.Parameters:chatServerUrl
– The URL to the Oracle Chat and Attachment Server. This cannot be null.context
– The application context. This cannot be null.
BotsConfiguration botsConfiguration = new BotsConfiguration.BotsConfigurationBuilder(<SERVER_URI>, getApplicationContext())
Initialize the SDK
public static void init(Application application, BotsConfiguration botsConfiguration)
public static void init(Application application, BotsConfiguration botsConfiguration, BotsCallback botsCallback)
public static void init(Application application, String chatServerUrl, String channelId, String userId, BotsCallback botsCallback)
public static void init(Application application, String chatServerUrl, AuthenticationTokenProvider authTokenProvider, BotsCallback botsCallback)
public static void init(Application application, BotsConfiguration botsConfiguration)
The public static void init(Application application, BotsConfiguration
botsConfiguration)
method initializes all of the services based on the
BotsConfiguration
instance passed by the user and establishes the
WebSocket connection to the Oracle Chat Server.
application
– The application instance. This cannot be null.botsConfiguration
– TheBotsConfiguration
object used to control the features of library. This cannot be null.
Bots.init(getApplication(),
botsConfiguration);
public static void init(Application application, BotsConfiguration botsConfiguration, BotsCallback botsCallback)
The public static void init(Application application, BotsConfiguration
botsConfiguration, BotsCallback botsCallback)
method initializes all of the
services based on the BotsConfiguration
instance passed by the user and
establishes the WebSocket connection to the Oracle Chat Server.
application
– The application instance. This cannot be null.botsConfiguration
– TheBotsConfiguration
object used to control the features of library. This cannot be null.botsCallback
– The callback received while establishing the connection.
Bots.init(getApplication(), botsConfiguration, new BotsCallback() {
@Override
public void onSuccess(Response paramResponse) {}
@Override
public void onFailure(Response paramResponse) {}
});
public static void init(Application application, String chatServerUrl, String channelId, String userId, BotsCallback botsCallback)
The public static void init(Application application, String chatServerUrl,
String channelId, String userId, BotsCallback botsCallback)
method
initializes all of the services with the default configuration. This method can be
invoked to connect to a channel with client authentication disabled.
application
– The application instance. This cannot be null.chatServerUrl
– The URL of the Oracle Chat Server. This cannot be null.channelId
– The Channel ID belonging to the Oracle Android channel that's routed to the skill or digital assistant. This cannot be null.userId
– A unique identifier for the user. The SDK initializes this value when it's not provided.botsCallback
– The callback received while establishing the connection to the Oracle Chat Server.
Bots.init(getApplication(), chatServerUrl, authTokenProvider, new BotsCallback() {
@Override
public void onSuccess(Response paramResponse) {}
@Override
public void onFailure(Response paramResponse) {}
});
public static void init(Application application, String chatServerUrl, AuthenticationTokenProvider authTokenProvider, BotsCallback botsCallback)
Invoke the public static void init(Application application, String
chatServerUrl, AuthenticationTokenProvider authTokenProvider, BotsCallback
botsCallback
method to connect to a channel that has client authentication
enabled. This method initializes all of the services with the default configuration.
application
– The application instance. This cannot be null.chatServerUrl
– The URL of the Oracle Chat Server. This cannot be null.authTokenProvider
– The instance ofAuthenticationTokenProvider
, which is used to generate the authentication token whenever it's needed.botsCallback
– The callback received while establishing connection.
BotsConfiguration botsConfiguration = new BotsConfiguration.BotsConfigurationBuilder(<SERVER_URI>, getApplicationContext())
Interface AuthenticationTokenProvider
The public String getAuthToken
method returns the string of the
generated token.
authTokenProvider
property to allow the SDK to generate a new
authentication token when one is required to establish an authenticated channel
connection. When implementing this interface, override the public String
getAuthToken
method.private class AuthTokenProvider implements AuthenticationTokenProvider {
@Override
public String getAuthToken() {
// Generate a new JWT Token and return
}
}
Interface BotsCallback
void onSuccess(Response paramResponse)
– This method is called when the web socket connection has been successfully established.void onFailure(Response paramResponse)
– This method is called on any failures that occur while initializing the library.
Show Conversation Activity
public
static void show(Context context)
. This method's
context
parameter is the context from which to
start the
activity.ConversationActivity.show(getApplicationContext())
Customize Notifications
NotificationCustomizer
class and passing the instance
to the notificationCustomizer
property. The constructors are:
NotificationCustomizer()
– Initializes the notification channel with the default configuration.NotificationCustomizer(String channelId)
– Initializes the notification channel with the given channel ID. ThechannelId
parameter is the ID of the notification channel through which the notifications are sent.-
NotificationCustomizer(String channelId, String channelName, String description, String title)
– Initializes the notification channel with the given parameters:channelID
– The ID of the notification channel through which notifications are sent.channelName
– The name of the notification channel through which the notifications are sent.description
– A description of the notification channel through which the notifications are sent.title
– The title displayed on the notifications.
new BotsConfiguration.NotificationCustomizer(<NOTIFICATION_CHANNEL_ID>,
<NOTIFICATION_CHANNEL_NAME>, <NOTIFICATION_CHANNEL_DESCRIPTION>, <NOTIFICATION_TITLE>);