AbsoluteJS

@absolutejs/devices-capacitor

@absolutejs/devices-capacitorv0.8.0betaNative Apps

Capacitor runtime adapter for @absolutejs/devices

#Installation

BASH
bun add @absolutejs/devices-capacitor

#Capabilities

Overview

Capacitor implementations for the provider-neutral @absolutejs/devices contracts. AbsoluteJS installs this adapter in the generated mobile shell; application code continues to import from @absolutejs/devices.

The release-candidate adapter covers:

app metadata and native platform identity;

Show 10 more

app state, native resume, and Android restored-operation delivery;

launch URLs, inbound links, and audited HTTP(S) external browser opening;

native network status and change events;

Android hardware-back events with an explicit capability check; and

namespaced ordinary preferences that never clear another package's keys; and

an Absolute-owned native credential vault backed by iOS Keychain and Android

Keystore AES-256-GCM encryption; plus

opt-in Clipboard, Share, Haptics, Camera, and scoped photo-picker provider

slices; and

opt-in foreground Geolocation with approximate/precise permission reporting,

Outcomes

What you can build

Build on the supported package contract

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

Hardening checklist

Production guidance

Make every external boundary explicitPin the deployed @absolutejs/devices-capacitor 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-capacitor example, confirm the supported entry point and version in the API explorer, then inspect the first boundary that did not produce its documented result.

#@absolutejs/devices-capacitor quick start

Partial snippet

# @absolutejs/devices-capacitor

TS
import { installCapacitorDeviceAdapterIfNative } from "@absolutejs/devices-capacitor";

const remove = installCapacitorDeviceAdapterIfNative();

#@absolutejs/devices-capacitor quick start 2

Partial snippet

# @absolutejs/devices-capacitor

TS
import { createCapacitorClipboardCapability } from "@absolutejs/devices-capacitor/clipboard";
import {
  createCapacitorCameraCapability,
  createCapacitorPhotosCapability,
} from "@absolutejs/devices-capacitor/camera";
import { createCapacitorHapticsCapability } from "@absolutejs/devices-capacitor/haptics";
import { createCapacitorKeyboardCapability } from "@absolutejs/devices-capacitor/keyboard";
import { createCapacitorLocationCapability } from "@absolutejs/devices-capacitor/location";
import { createCapacitorLocalNotificationsCapability } from "@absolutejs/devices-capacitor/local-notifications";
import { createCapacitorPushNotificationsCapability } from "@absolutejs/devices-capacitor/push-notifications";
import { createCapacitorDocumentsCapability } from "@absolutejs/devices-capacitor/documents";
import { createCapacitorShareCapability } from "@absolutejs/devices-capacitor/share";
import { createCapacitorSystemBarsCapability } from "@absolutejs/devices-capacitor/system-bars";

#Public entry points

Supported entry points declared by this package manifest.

Package entry point declared in package.json.

@absolutejs/devices-capacitor@absolutejs/devices-capacitor/clipboard@absolutejs/devices-capacitor/camera@absolutejs/devices-capacitor/haptics@absolutejs/devices-capacitor/keyboard@absolutejs/devices-capacitor/location@absolutejs/devices-capacitor/local-notifications@absolutejs/devices-capacitor/push-notifications@absolutejs/devices-capacitor/documents@absolutejs/devices-capacitor/share@absolutejs/devices-capacitor/system-bars

#Package commands

Scripts declared by this package manifest.

bun run buildbun build src/index.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 @capacitor/core --external @capacitor/app --external @capacitor/browser --external @capacitor/camera --external @capacitor/clipboard --external @capacitor/file-viewer --external @capacitor/filesystem --external @capacitor/geolocation --external @capacitor/haptics --external @capacitor/keyboard --external @capacitor/local-notifications --external @capacitor/network --external @capacitor/preferences --external @capacitor/push-notifications --external @capacitor/share && 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.

12 symbols
AbsoluteSecureStorageBackendtypePermalinkSource
TS
type AbsoluteSecureStorageBackend = "keychain" | "keystore" | "unavailable";
Exported from @absolutejs/devices-capacitor