You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fb29e91
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+90-17Lines changed: 90 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,33 @@ export default function App() {
61
61
}
62
62
```
63
63
64
-
**Embedded full-screen chat** — place it directly in your own navigation, e.g. as a "Support" screen:
64
+
**Script Method (WebView Embed — 100% web widget parity)** — loads the exact production widget served at `/embed/{botId}` with pixel-for-pixel visual and feature parity, including client-side voice messages, file attachments, AI search, and CSAT:
@@ -155,6 +181,37 @@ The button color follows the active design's accent automatically — same as we
155
181
/>
156
182
```
157
183
184
+
### `ChattyEmbedView` (Script Method)
185
+
186
+
The official web widget hosted in a React Native `WebView`. Guaranteed pixel-for-pixel and feature-for-feature parity with the web widget, with automatic permission reflection, alert suppression, and OEM font scale isolation:
187
+
188
+
```tsx
189
+
<ChattyEmbedView
190
+
botId={string}
191
+
baseUrl={string}// optional, defaults to https://chatty.personaliai.com
192
+
onReady={() =>void}// optional, fired when web widget finishes loading
193
+
onMessage={() =>void}// optional, fired on every assistant reply
194
+
onClose={() =>void}// optional, fired when user closes the widget / CSAT
195
+
onRequestNotificationPermission={(botName) =>void}// optional, fired on notification bell tap
196
+
onMicPermissionNeeded={() =>void}// optional, fired on mic tap if RECORD_AUDIO not granted
197
+
onLocationPermissionNeeded={() =>void}// optional, fired on location attach if not granted
198
+
/>
199
+
```
200
+
201
+
### `ChattyMarkdown`
202
+
203
+
Real CommonMark + GFM (tables, strikethrough, blockquotes, code blocks with copy) + LaTeX equation support (`$inline$` and `$$block$$`), matching web widget's feature set. Used automatically by `ChattyChatView` and available standalone:
|`POST_NOTIFICATIONS` (Android 13+) | Runtime-gated | Header bell button → local notification-permission ask | User taps the bell, only if `enableNotificationBell` (default `true`) |
197
-
198
-
Set `enableNotificationBell={false}` to hide the bell button entirely — the SDK then never calls
199
-
`PermissionsAndroid.request` at all, so your app fully controls if/when/how notification
200
-
permission is ever requested. Your app remains free to request it itself, on its own schedule,
201
-
for its own purposes.
202
-
203
-
**Camera, photo library, and microphone are never requested by this SDK at all** — as noted
204
-
above, `onCameraPress` / `onPhotoLibraryPress` / `onMicPress` are plain callbacks; your app
205
-
supplies its own picker/recorder package (`expo-image-picker`, `react-native-image-picker`,
206
-
`expo-av`, etc.) and that package's own permission flow runs entirely under your control. This
207
-
SDK adds no `CAMERA`/`RECORD_AUDIO`/photo-library manifest entries or Info.plist keys of its own —
208
-
whatever picker/recorder you choose documents what it needs.
In `ChattyEmbedView`, the SDK checks permissions read-only and reflects the status to the web widget. If a user taps the mic or location attach without permissions, `onMicPermissionNeeded` or `onLocationPermissionNeeded` fires so you can present your own rationale and request the permission. Once granted, returning to the view or subsequent taps immediately succeed.
0 commit comments