Newer Version Available

This content describes an older version of this product. View Latest

Use Mobile Device Features in Mobile Apps

Mobile capabilities let you use mobile device features from within a Lightning web component. Access camera and location detection hardware, and platform features like contacts and calendar data, right from your component code. Build Lightning apps that feel like native mobile apps using these mobile-specific features.

Mobile capabilities are built by Salesforce using the Nimbus framework. Nimbus creates a bridge between Lightning web components and a mobile device’s native operating system and hardware. Nimbus plugins use the Nimbus framework, and are compiled into Salesforce mobile apps, with each plugin providing access to a specific feature area.

Nimbus plugins expose native features to Lightning web components through JavaScript APIs, allowing you to easily access these features in your Lightning web components.

Mobile capabilities built with Nimbus can only be used when your Lightning web component runs in a supported mobile app running on a mobile device. They are built on, and depend on, compiled code included in the mobile app. They cannot be used on desktop, or in a mobile web browser.

Mobile Capabilities Compatibility Summary

Mobile capabilities are supported individually by each Salesforce mobile app. Not every mobile capability is supported in every mobile app. The following table provides a compatibility overview, but see the compatibility topic for each mobile capability for full compatibility details.

Mobile Capability Salesforce Mobile Salesforce Mobile App Plus Mobile Publisher Field Service Mobile
AppReviewService Not Supported Not Supported Supported Not Supported
BarcodeScanner Supported Supported Supported Limited Support See note.
BiometricsService Supported Supported Supported Not Supported
CalendarService Not Supported Supported iOS only. Supported Not Supported
ContactsService Not Supported Supported iOS only. Supported Not Supported
DocumentScanner Supported Supported Not Supported Supported
LocationService Supported Android only. Supported Supported Supported
NFCService Supported Supported Not Supported Supported Android only.

The Field Service Mobile app provides an alternative implementation of BarcodeScanner. See Scan Barcodes on a Mobile Device in the Field Service Developer Guide for details.

Note