Compatibility and Requirements

DocumentScanner is a JavaScript module that provides an API to Lightning web components to make mobile hardware and platform (operating system) features available in JavaScript. It requires access to device hardware and device platform APIs. This access is only available when DocumentScanner runs within a compatible Salesforce mobile app. It does not and cannot function when running in a standard web browser, whether the browser runs on a desktop or mobile device.

DocumentScanner is available in Lightning apps distributed using:

  • Salesforce Mobile app
  • Salesforce Field Service app

DocumentScanner is fully functional when used in a Lightning app or Lightning site that’s run from a compatible Salesforce mobile app on a compatible iOS or Android mobile device. See Requirements for the Salesforce Mobile App, or the requirements page for your target mobile app for specific device and operating system requirements.

DocumentScanner is not fully available when running on other devices, such as a desktop, or when running in a web browser, even on a mobile device. It requires one of the apps listed above. The DocumentScanner API is accessible in Lightning Experience on all devices, so your code won’t fail due to missing functions. However, when your app runs in a browser—desktop or mobile—it can use only DocumentScanner constants and utility functions. Attempting any document scanning operation will fail.