Host app integration — providers, toasts, tab bars & navigation
Use this section when the package runs inside another app (Fieldr or any app with its own navigation, toasts and providers) and chat works on one screen but toasts, calls or taps misbehave elsewhere.
Providers the package adds
Toasts — withToast={false}
The package still calls Toast.show(...) (success, error, info, and notification for the in-app banner), so your app's <Toast config={toastConfig} /> must be mounted and must have a notification entry (text1 = title, text2 = body, onPress opens the conversation). See Fieldr's toastConfig.tsx.
Tab bars that float over the screen
Set ui.conversationList.fabBottomInset to the tab bar height (Fieldr: 70, matching TAB_BAR_HEIGHT), otherwise the FAB and the last rows hide behind it.
One global config
configureChat / ChatProvider config write one global config. Two screens with different ui.styles or flags overwrite each other in mount order. Keep per-screen configs identical except for keys you deliberately change, and keep ui.styles in one place (Fieldr's useScopedChatConfig.ts).
One CallProvider
ChatNavigator mounts one. An app-wide CallProvider (for calls from any screen) must only render while no ChatNavigator is mounted — Fieldr tracks this with chatNavigatorPresence.ts.
Push listeners in the host
Host FCM / Notifee listeners must skip isRealtimexPush(extractPushData(message)) and forward the launch notification (openRealtimexNotification / handleRealtimexNotifeeEvent). See Fieldr's GlobalNotificationListener.tsx.
What the package does not require
- Installing Lexical, DOMPurify, Zustand, axios or any bundled library in the host app.
- Any
MainActivity,MainApplicationor AppDelegate code besidesFirebaseApp.configure(). - Copying native files from the package into the app.