Scandit.Device

Methods

(static) caseMode(): boolean

Checks if case mode is active

Returns:
boolean

active

Examples
  • JavaScript
  • ES6
Scandit.Device.caseMode()
Scandit.Device.caseMode()

(static) getInfo(): object

Detailed device info

Returns:
object

Device info object

Examples
  • JavaScript
  • ES6
Scandit.Device.getInfo();
// {
//   platform:        device platform name, e.g. ANDROID, IOS
//   osVersion:       device OS version, e.g. 5.0
//   deviceId:        unique device ID
//   deviceModel:     device model, e.g. Samsung / GT-123
//   name:            name of the device
//   customerName:    name of the customer
//   teamName:        name of the team
//   email:           email address of the user
//   userGroups:      array of groups to which the user belongs
//   firstName:       first name of the user
//   lastName:        last name of the user
//   invitationEmail: (deprecated) the email address of the user
//   group:           (deprecated) group to which device belongs, possible values: development, test, production
// }
Scandit.Device.getInfo();
// {
//   platform:        device platform name, e.g. ANDROID, IOS
//   osVersion:       device OS version, e.g. 5.0
//   deviceId:        unique device ID
//   deviceModel:     device model, e.g. Samsung / GT-123
//   name:            name of the device
//   customerName:    name of the customer
//   teamName:        name of the team
//   email:           email address of the user
//   userGroups:      array of groups to which the user belongs
//   firstName:       first name of the user
//   lastName:        last name of the user
//   invitationEmail: (deprecated) the email address of the user
//   group:           (deprecated) group to which device belongs, possible values: development, test, production
// }

(static) getLanguage(): string

Detects device language

See:
Returns:
string

Two letters language code

Examples
  • JavaScript
  • ES6
Scandit.Device.getLanguage() // => 'en'
Scandit.Device.getLanguage() // => 'en'

(static) getLocale(): string

Detects device locale

Returns:
string

Language and country code. E.g. en_US

Examples
  • JavaScript
  • ES6
Scandit.Device.getLocale() // 'en_US'
Scandit.Device.getLocale() // 'en_US'

(static) keepScreenActive(active: boolean)

Keeps screen active so it doesn't dim, lock etc.

Parameters:
Name Type Description
active boolean
Examples
  • JavaScript
  • ES6
Scandit.Device.keepScreenActive(true);
Scandit.Device.keepScreenActive(true);