journey.hardware
Property | Description | Example |
---|---|---|
getCurrentLocation | Note: This feature was introduced in version 4.81.1 of the JourneyApps Runtime. | |
scanBarcode | Accepts the following optional parameters: Note: This feature was introduced in version 4.81.1 of the JourneyApps Runtime. |
Limitation
Capturing the
altitude
and/or vertical_accuracy
is not supported on several platforms / devices, including Android devices. These devices will return undefined
or null
for these fields.main.ts
async function init() {
var currentLocation = await journey.hardware.getCurrentLocation();
console.log(currentLocation);
// {latitude: -33.9002979, longitude: 18.847503, altitude: undefined, horizontal_accuracy: 28.622, vertical_accuracy: undefined, timestamp: "2022-10-31T09:48:21Z"}
}
main.ts
async function scanBarcode() {
view.barcode = await journey.hardware.scanBarcode({types: ['QR_CODE']});
}
Last modified 3mo ago