scanner
const scanner: { scanBusinessCard: Promise<ScanResult>; scanBadge: Promise<ScanResult>;};Defined in: domains/scanner.ts:27
Type Declaration
Section titled “Type Declaration”scanBusinessCard()
Section titled “scanBusinessCard()”scanBusinessCard(eventID?): Promise<ScanResult>;Open the native business card scanner and capture a contact.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
eventID? |
number |
Optional lead retrieval event ID to associate the scan with. |
Returns
Section titled “Returns”Promise<ScanResult>
A ScanResult — check isSuccess before accessing businessCard.
Remarks
Section titled “Remarks”iOS app only. Throws in all other environments.
Long-lived host bridge: per-request timeout: 0, no automatic retry.
Throws
Section titled “Throws”MobileLockerError if called outside the iOS app.
Example
Section titled “Example”const result = await mobilelocker.scanner.scanBusinessCard()if (result.isSuccess) console.log(result.businessCard)scanBadge()
Section titled “scanBadge()”scanBadge(eventID): Promise<ScanResult>;Open the native badge scanner and capture an event attendee.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
eventID |
number |
The lead retrieval event ID to associate the scan with. |
Returns
Section titled “Returns”Promise<ScanResult>
A ScanResult — check isSuccess before accessing attendee.
Remarks
Section titled “Remarks”iOS app only. Throws in all other environments.
Long-lived host bridge: per-request timeout: 0, no automatic retry.
Throws
Section titled “Throws”MobileLockerError if called outside the iOS app.
Example
Section titled “Example”const result = await mobilelocker.scanner.scanBadge(eventID)if (result.isSuccess) console.log(result.attendee)