Skip to content

Commit c66822e

Browse files
authored
Merge pull request #41 from sendbird/feature/elliot/Update-README
Feature/elliot/update readme
2 parents ab4acaf + e3f1e25 commit c66822e

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

android/README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ val params = LauncherLayoutParams(
240240
LauncherLocation.BOTTOM_END
241241
)
242242
243-
MessengerLauncher(context).attach(context, aiAgentId = "your_ai_agent_id", params = params)
243+
MessengerLauncher(this, it, params).attach()
244244
```
245245
246246
- `LauncherLayoutParams` allows you to configure the MessengerLauncher’s behavior and appearance:
@@ -280,7 +280,7 @@ You can update the SDK's color scheme to match your app's theme as shown below.
280280
AIAgentMessenger.setThemeMode(themeMode) // Options: MessengerThemeMode.Dark, MessengerThemeMode.Light
281281
```
282282
283-
Since apps may allow users to switch themes manually or follow the device's settings, theme updates need to be explicitly called.
283+
Since apps may allow users to switch themes manually or follow the device's settings, theme updates need to be explicitly called.
284284

285285

286286
### Deauthenticate and clear session
@@ -290,4 +290,24 @@ When the user logs out of your app, de-authenticate the SDK to clear session dat
290290
```kotlin
291291
AIAgentMessenger.deauthenticate()
292292
```
293-
293+
294+
295+
### Passing context object to Agent
296+
297+
You can predefine customer-specific information such as country, language, or other custom context data to guide the AI Agent in providing faster and more accurate responses.
298+
299+
This allows for a more personalized and context-aware interaction experience.
300+
301+
> Once the contexts are set, they will be used throughout the conversation to provide personalized and context-aware responses.
302+
303+
```kotlin
304+
AIAgentMessenger.metadata.message.contextObject.put("key1", "value1")
305+
AIAgentMessenger.metadata.message.contextObject.putAll(
306+
mapOf(
307+
"key1" to "value1",
308+
"key2" to "value2"
309+
)
310+
)
311+
AIAgentMessenger.metadata.message.contextObject.remove("key1")
312+
AIAgentMessenger.metadata.message.contextObject.clear()
313+
```

0 commit comments

Comments
 (0)