AbsoluteJS

@absolutejs/devices-expo

@absolutejs/devices-expov0.0.11betaNative Apps

Expo runtime adapter for @absolutejs/devices

#Installation

BASH
bun add @absolutejs/devices-expo

#Capabilities

Overview

Expo SDK 57 provider for the framework-neutral @absolutejs/devices contracts. AbsoluteJS provisions this package and only the detected optional Expo modules. Application code continues to import capabilities from @absolutejs/devices.

The root entry installs platform, lifecycle, links, Android Back, network, and namespaced ordinary storage. Optional capabilities are exposed through isolated subpaths so unused permissions and native modules are not added to an app.

On Android, the photo provider consumes Expo Image Picker's pending result when the system recreates the host activity. The normalized result is replayed once per subscriber through lifecycle.onRestoredOperation; embedded routes receive photo bytes through the same bounded transfer bridge as an ordinary pick. Native paths and Expo result objects are not exposed across that bridge. This recovery uses a short, bounded retry window so a result published just after activity recreation is still recovered without application-owned Android code or continuous polling. A restored operation uses plugin: "expo-image-picker", method: "pick", and carries either normalized DevicePhoto[] data or a public error.

Show 1 more

If Android destroys the JavaScript process and the user then cancels the external picker, Expo has no successful result to retain. AbsoluteJS can inject its generated native activity-result cancellation signal; the adapter then turns an inherited in-flight descriptor into one public cancelled operation and deletes the descriptor. Elapsed time is never treated as proof of cancellation, and a picker still owned by the current JavaScript process is never abandoned.

Outcomes

What you can build

Build on the supported package contract

Use @absolutejs/devices-expo through its supported public entry points.

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/devices-expo version, replace example or memory-backed dependencies with durable implementations, bound external calls, protect credentials, and emit enough evidence to retry or recover safely.

Follow in order

Troubleshooting path

1
Trace from the first failed boundary
Reproduce the smallest canonical @absolutejs/devices-expo example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/devices-expo@absolutejs/devices-expo/bridge@absolutejs/devices-expo/camera@absolutejs/devices-expo/clipboard@absolutejs/devices-expo/documents@absolutejs/devices-expo/haptics@absolutejs/devices-expo/keyboard@absolutejs/devices-expo/local-notifications@absolutejs/devices-expo/location@absolutejs/devices-expo/push-notifications@absolutejs/devices-expo/share@absolutejs/devices-expo/system-bars@absolutejs/devices-expo/package.json

#Package commands

Scripts declared by this package manifest.

bun run buildbun build src/index.ts src/bridge.ts src/camera.ts src/clipboard.ts src/documents.ts src/haptics.ts src/keyboard.ts src/localNotifications.ts src/location.ts src/pushNotifications.ts src/share.ts src/systemBars.ts --root src --outdir dist --target=browser --external @absolutejs/devices --external @react-native-async-storage/async-storage --external expo-application --external expo-clipboard --external expo-device --external expo-document-picker --external expo-file-system --external expo-haptics --external expo-image-manipulator --external expo-image-picker --external expo-linking --external expo-localization --external expo-location --external expo-navigation-bar --external expo-network --external expo-notifications --external expo-sharing --external expo-status-bar --external react-native && tsc --emitDeclarationOnly -p tsconfig.build.json
bun run typechecktsc --noEmit

#API reference

Search the declarations exported by the current package type files. Expand a symbol to inspect its source-backed signature.

3 symbols
ExpoDeviceAdapterOptionstypePermalinkSource
TS
type ExpoDeviceAdapterOptions = {
    camera?: DeviceCameraCapability;
    clipboard?: DeviceClipboardCapability;
    documents?: DeviceDocumentsCapability;
    haptics?: DeviceHapticsCapability;
    keyboard?: DeviceKeyboardCapability;
    localNotifications?: DeviceLocalNotificationsCapability;
    location?: DeviceLocationCapability;
    photos?: DevicePhotosCapability;
    pushNotifications?: DevicePushNotificationsCapability;
    share?: DeviceShareCapability;
    storagePrefix?: string;
    systemBars?: DeviceSystemBarsCapability;
    takeActivityResultCancellation?: () => boolean | Promise<boolean>;
};
Exported from @absolutejs/devices-expo