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 b3387ea
Browse filesBrowse the repository at this point in the historyBrowse files
feat: let host apps opt out of the notification permission request
PermissionsAndroid.request(POST_NOTIFICATIONS) fired unconditionally
whenever the bell button was tapped, with no way for a host app to
prevent it. Adds enableNotificationBell (default true, backward
compatible) to ChattyChatView — when false, the button is hidden and
the SDK never calls PermissionsAndroid.request, so integrating apps
fully control if/when/how it's requested. Camera/photo/mic already
never request permissions themselves (host-supplied callbacks).
Documents this in a new README Permissions section.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,6 +125,7 @@ this release; color, radius, and header/bubble treatment carry most of a design'
125
125
onMessage={(message) =>void}
126
126
onVoiceCallPress={() =>void}
127
127
onNotificationBellPress={() =>void}
128
+
enableNotificationBell={boolean}// optional, defaults to true — see Permissions
128
129
/>
129
130
```
130
131
@@ -148,6 +149,7 @@ The button color follows the active design's accent automatically — same as we
148
149
onNotificationBellPress={() =>void}// optional, header notification-bell button — see Notes
149
150
onClose={() =>void}// optional, renders a header close (✕) button.
150
151
// ChattyLauncher passes this for you.
152
+
enableNotificationBell={boolean}// optional, defaults to true — see Permissions
151
153
/>
152
154
```
153
155
@@ -176,6 +178,32 @@ layout.
176
178
177
179
### Notes
178
180
181
+
<detailsopen>
182
+
<summary><strongid="permissions">Permissions — what this SDK requests, and how to opt out</strong></summary>
183
+
184
+
<br>
185
+
186
+
This SDK requests exactly one permission itself, and only in direct response to a button tap —
187
+
never on load, never speculatively:
188
+
189
+
| Permission | Risk | Used for | Requested when |
190
+
|---|---|---|---|
191
+
|`POST_NOTIFICATIONS` (Android 13+) | Runtime-gated | Header bell button → local notification-permission ask | User taps the bell, only if `enableNotificationBell` (default `true`) |
192
+
193
+
Set `enableNotificationBell={false}` to hide the bell button entirely — the SDK then never calls
194
+
`PermissionsAndroid.request` at all, so your app fully controls if/when/how notification
195
+
permission is ever requested. Your app remains free to request it itself, on its own schedule,
196
+
for its own purposes.
197
+
198
+
**Camera, photo library, and microphone are never requested by this SDK at all** — as noted
199
+
above, `onCameraPress` / `onPhotoLibraryPress` / `onMicPress` are plain callbacks; your app
200
+
supplies its own picker/recorder package (`expo-image-picker`, `react-native-image-picker`,
201
+
`expo-av`, etc.) and that package's own permission flow runs entirely under your control. This
202
+
SDK adds no `CAMERA`/`RECORD_AUDIO`/photo-library manifest entries or Info.plist keys of its own —
203
+
whatever picker/recorder you choose documents what it needs.
204
+
205
+
</details>
206
+
179
207
<detailsopen>
180
208
<summary><strong>Security — <code>bot_id</code> and domain restriction</strong></summary>
0 commit comments