Recipes
End-to-end solutions to real problems. Each recipe is a copy-pasteable file you can drop into a React Native app. Cross-links point to the API reference for deeper details.
UX flows
- Limited photo access + upgrade — iOS 14+ partial photo access, detect with
isLimited, upgrade withrequestFullAccess()andrenderLimited. - Onboarding permission wall — sequential multi-permission flow with stable
idkeys andresume()for settings round-trips. - Voice note composer — inline microphone access using
skipPrePrompt: "android". - Speech recognition — iOS needs both
MICROPHONEandSPEECH_RECOGNITION; Android needs onlyRECORD_AUDIO. Platform-aware sequential flow. - Imperative camera access — button-triggered camera permission inside a mid-form flow (KYC, profile photo, ID capture) without unmounting form state.
- Location accuracy UI — render precise-vs-approximate map and ETA from
result.metadata.locationAccuracyon iOS 14+ (Expo engine).
Platform-specific bundles
- Background location — foreground → background location using
Permissions.BUNDLES.LOCATION_BACKGROUND. - Bluetooth device pairing — BLE pairing using
Permissions.BUNDLES.BLUETOOTH.
Reliability and testing
- Recheck on foreground — auto-detect permission changes made in system Settings outside your blocked-prompt flow (
recheckOnForeground: true). - Stale permission state — work around Expo's cold-start stale
undeterminedbug (expo/expo#42084). - Android status normalization — when and why to enable
normalizeAndroidandnormalizePhotoLibrary. - Testing with
createTestingEngine— unit-testing components and hooks that use this library.