mobile-platform-native-capabilities-integrate

Integrate native mobile device capabilities into Salesforce Lightning web components.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Build --skill mobile-platform-native-capabilities-integrate-padjei
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mobile-platform-native-capabilities-integrate
Source: https://github.com/padjei/SF_Build/tree/main/.claude/skills/mobile-platform-native-capabilities-integrate
Command: npx skills add https://github.com/padjei/SF_Build --skill mobile-platform-native-capabilities-integrate-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building Salesforce LWCs that access native mobile device features requires knowing which capability service to use, its exact TypeScript API, and how to handle availability gating and typed failure codes — this Skill provides the authoritative API references and wiring workflow so the generated component works correctly inside Salesforce mobile apps. ## Core Features & Use Cases - Capability Routing: Maps a feature request to one of 11 native services — barcode scanner, biometrics, location, geofencing, NFC, calendar, contacts, document scanner, AR space capture, app review, and payments. - Authoritative API References: Loads per-capability TypeScript definitions from lightning/mobileCapabilities, including deprecated methods to avoid and typed failure-code enums. - Safe Integration Patterns: Enforces isAvailable() gating, non-deprecated entry points, and per-failure-code error handling for graceful degradation on desktop and mobile web. - Use Case: A developer asks for an LWC that scans a QR code and writes the value into a record field — the Skill routes to the Barcode Scanner reference, uses scan() instead of the deprecated capture methods, and maps rejection codes like USER_DENIED_PERMISSION to actionable UX. ## Quick Start Ask the agent to build an LWC that uses a native device capability, for example: create a Lightning web component that scans a barcode and saves the value to a field.

Frequently Asked Questions about mobile-platform-native-capabilities-integrate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use the barcode scanner in a Salesforce LWC?▼

Import getBarcodeScanner from lightning/mobileCapabilities, call isAvailable() first, then use the scan(options) method with your desired barcodeTypes. Avoid the deprecated beginCapture, resumeCapture, and endCapture methods, and handle BarcodeScannerFailureCode values on rejection.

What native mobile capabilities are available in Salesforce Lightning web components?▼

The lightning/mobileCapabilities module exposes 11 services: App Review, AR Space Capture, Barcode Scanner, Biometrics, Calendar, Contacts, Document Scanner, Geofencing, Location, NFC, and Payments. Each is obtained through its own factory function and extends a common BaseCapability interface.

Does lightning/mobileCapabilities work on desktop or mobile web?▼

No, these capabilities only work when the LWC runs inside a supported Salesforce mobile app such as the Salesforce Mobile App or Field Service Mobile App. On desktop or mobile web the factory still returns an object, but isAvailable() returns false, so every call must be gated.

Why does isAvailable() return false on a real mobile device?▼

This happens when the device runs an unsupported app surface or the service is disabled by an org-level setting. The fix is org configuration rather than code changes, since the capability cannot be enabled programmatically.

How should I handle errors from mobile capability services?▼

Each service rejects with a typed failure-code enum such as BarcodeScannerFailureCode or LocationServiceFailureCode. Map codes to distinct UX states: USER_DENIED_PERMISSION can prompt again, USER_DISABLED_PERMISSION must direct the user to OS settings, and SERVICE_NOT_ENABLED is a developer-facing error.

When should I not use the mobile capabilities skill?▼

Do not use it for mobile offline or Komaci priming reviews of an LWC, which belong to the mobile-platform-offline-validate skill, or for picking generic Lightning base components. It is scoped specifically to native device capability integration.