RealTimeX
Sign inStart for free
RealTimeXMobile Package
Introduction5-minute overviewFeaturesHow the package worksGlossary
Requirements & dependenciesBackend credentialsInstallation step by stepTutorial — your first chat appProject config fileApp entry — index.jsQuick start — minimum working chatComplete ChatScreen example
Native configuration (iOS & Android)Firebase, APNs & backend setup
Navigation — embedding the chatSession, auth & Socket.IOPermissions & access controlAudio & video callingPush notificationsMentions viewRich-text messages (WebView editor)Total unread count
Customization — four waysDefault component fallback (important)Which slots are wiredCustomization examples (Case 1–4)UI feature flags & copy (ui)Chat info (group + DM)Style overrides (ui.styles)Render props (ChatProvider)Theme, fonts & appearance
ChatProvider props referenceconfigureChat options referenceHooks & storeCallbacks referenceAPI query paramsAll exports
Production integration pattern (Fieldr)Host app integration — providers, toasts, tab bars & navigationEnvironment variablesLocal package / monorepo (Metro)
TroubleshootingSetup checklistArchitectureDocumentation & file mapPackage development (maintainers)License
Mobile packageFeatures & Guides

Permissions & access control

Three layers decide what a user can do: OS permissions (camera, microphone…), workspace settings from GET /settings/effective (feature gates and limits set by the client admin), and group roles (owner, admins, members, per-group permissions). The package applies all three the same way as the web package; the backend enforces them again.

OS permissions

PermissionPlatformAsked byWhen
NotificationsiOS; Android 13+ (POST_NOTIFICATIONS)Package (ChatProvider, through Firebase Messaging)After sign-in, when /push/config is configured and enabled
Camera, microphoneBothPackage (call UI, react-native-permissions)Starting or accepting a call
Photos, cameraBothPackage (composer)Picking attachments
Full-screen intentAndroid 14+System / Play ConsoleCalling apps only; otherwise a heads-up notification
Screen recordingBothSystemStarting a screen share

iOS can't show a permission prompt from the lock screen. Accepting a CallKit call on a phone that never granted camera / microphone rejects the call (permission_denied) — ask for both during onboarding or on the first call.

Feature gates (effective settings)

Denied controls generally stay visible but disabled and explain why on tap.

tsx
1import {useAdminFeatureGate, useEffectiveSettings} from '@realtimexsco/live-chat-react-native';2 3const gate = useAdminFeatureGate('videoCall'); // { visible, enabled, disabledReason }4const {settings, refresh, getGate, isGroupPermissionLocked} = useEffectiveSettings();
AdminFeatureKeyControls
audioCall, videoCallCall buttons (also need calls configured for the platform)
pushNotificationPush registration and settings
blockUsersBlock / unblock
attachmentsAttach button and sheet
groupCreationNew group
threadsReply in thread, thread drawer
draftsSaved drafts
canvasCanvas list and editor
whiteboard, callRecordingIn-call whiteboard and recording

Pure helpers: getFeatureGate(settings, key), getCallGate(settings, mode), getCallsPlatformGate, getCallRecordingGate, getWhiteboardGate, isGroupPermissionLocked, and the messages ADMIN_PERMISSION_DENIED_MESSAGE, CALLS_NOT_CONFIGURED_MESSAGE, CALLS_NOT_ALLOWED_BY_PLATFORM_MESSAGE.

Workspace limits

SettingEffect in the app
attachments (enabled, allowed MIME types, files per message, max size MB)Checked before upload. Allowed types null / missing = any type; an empty list [] = no type allowed
maxPinnedMessagesPerConversationPin cap; 0 hides the Pin action
maxParticipantsPerGroupMember pickers stop at the cap (create group, add members)
maxAdminsPerGroupMake group admin is refused at the cap (the owner counts)
maxGroupsPerUserEnforced by the backend; the refusal (GROUP_LIMIT_REACHED) is shown as a toast
Edit and delete windows (DM / group / thread)Edit / Delete for everyone are offered only inside the window
maxMessagesPerMinuteA refused send starts a cooldown (retryAfter)
maxRepliesPerThread, draft limitsThread replies and drafts

When the backend refuses an action (GROUP_LIMIT_REACHED, PIN_LIMIT_REACHED, ATTACHMENT_TYPE_NOT_ALLOWED, MESSAGE_RATE_LIMITED, …) the package shows the server's message as is and, for a refused send, removes the optimistic message and keeps the text in the composer.

Group roles and group permissions

RuleBehavior
Ownerowner → createdBy → creator on the conversation. Counts as an admin
Manage admins (make / dismiss)Owner only; when the backend sends no owner, any admin
Remove membersAdmins always; members only if allowMemberRemove. The owner can never be removed
Add membersAdmins always; members only if allowMemberAdd
Edit group infoAdmins; members unless onlyAdminCanEditInfo
Send messagesEveryone unless onlyAdminCanSendMessage (members then see the "Only admins can send messages" banner)
Edit own messagesOwner / admins always; members only if senderCanEditMessage
Admin capmaxAdminsPerGroup counts the owner even when not listed in admins

Group permission keys and package defaults (DEFAULT_GROUP_PERMISSIONS): onlyAdminCanSendMessage: false, onlyAdminCanEditInfo: false, senderCanEditMessage: true, allowMemberAdd: true, allowMemberRemove: false, moderationEnabled: false.

Resolution order: package defaults → workspace groupPolicy.defaults → the group's own values → keys in groupPolicy.locked always use the workspace default (locked toggles show a lock and can't be changed). The same resolved values are sent when a group is created or its permissions are saved.

PreviousSession, auth & Socket.IONextAudio & video calling

On this page

OS permissionsFeature gates (effective settings)Workspace limitsGroup roles and group permissions
Back to top