clientInfoAndroid

clientInfoAndroid

Contains constants and functions for a iOS Client Info Event.

The structure for a iOS Client Info Event is as follows:

{
  payload: {
    deviceInfo: {
      Canonical platform name: 'Android'
      Device name: <string>,
      Device type: <string>,
      Device manufacturer: <string>,
      Operating system: <string>,
      Screen size: <string>,
      Battery level: <integer>,
      Location service enabled: <boolean>,
      Location authorization status: <string>,
      Carrier name: <string>,
      Low power mode enabled: <boolean>,
    },
    appSettings: <object>,
    type: 'connect'
    version: <string>,
  },
  type: 'client'
  annotations: <array>,
  clientId: <string>,
  timestamp: <number>,
  uuid: <string>,
}
Source:

Members

(static, constant) group

A grouping for this object

Source:

(static, constant) label

A label that can be used when describing this object

Source:

(static, constant) matcher

Matcher can be used to find matching iOS Client Info Event objects.

Source:
See:
  • kit.match

(static, constant) parentDepth

Describes the number of parents this object has based off schema references. When checking for matches for example, we want to use a schema that is more specific over a more generic schema

Source:

(static, constant) path :string

Paths for the keys on a iOS Client Info Event

Properties:
Name Type Description
payload string

An object with custom data describing the event.
Path is payload.

deviceInfo string

A map containing details about the connected device.
Path is payload.deviceInfo.

platform string

Canonical name for the platform. Used for Griffon identifying if the device is iOS or Android.
Path is payload.deviceInfo."Canonical platform name".

deviceName string

Read from Build.MODEL, which is the end-user-visible name for the end product..
Path is payload.deviceInfo."Device name".

deviceType string

The style of interface to use on the current device..
Path is payload.deviceInfo."Device type".

manufacturer string

The manufacturer of the product/hardware..
Path is payload.deviceInfo."Device manufacturer".

os string

The value is in the format "Android ".
Path is payload.deviceInfo."Operating system".

screenSize string

Phones display resolution in pixels (width x height).
Path is payload.deviceInfo."Screen size".

batteryLevel string

The battery charge level for the device. This is integer value ranging from 1 to 100. If unable to fetch battery value -1 is returned.
Path is payload.deviceInfo."Battery level".

locationEnabled string

The current enabled/disabled state of location for the device..
Path is payload.deviceInfo."Location service enabled".

locationAuth string

Tells the app’s authorization status for using location services..
Path is payload.deviceInfo."Location authorization status".

carrierName string

Represents the carrier name. "Unknown" if this value is not available, or not valid on the platform..
Path is payload.deviceInfo."Carrier name".

lowPowerMode string

Indicates whether Low Power Mode is enabled on an iOS device..
Path is payload.deviceInfo."Low power mode enabled".

appSettings string

A map containing details about the settings of the application on which Griffon is registered.
Path is payload.appSettings.

type string

Constant value representing this event will initiate a connection.
Path is payload.type.

version string

Griffon SDK Extension version.
Path is payload.version.

rootType string

The type of event.
Path is type.

annotations string

Array of Annotation objects.
Path is annotations.

clientId string

A unique id that differentiates clients from one another.
Path is clientId.

timestamp string

When the event occurred.
Path is timestamp.

rootId string

Uniquely identifies each event.
Path is uuid.

Source:

(static, constant) PLATFORM

The value for platform for a iOS Client Info Event.

Path is payload,deviceInfo,Canonical platform name.

Source:

(static, constant) ROOT_TYPE

The value for rootType for a iOS Client Info Event.

Path is type.

Source:

(static, constant) TYPE

The value for type for a iOS Client Info Event.

Path is payload,type.

Source:

Methods

(static) get(alias, data) → {*}

Retrieves a value from the object. You can provide either a path or an alias.

Parameters:
Name Type Description
alias string

Path or alias

data *

Data to search

Source:

(static) getBatteryLevel(source) → {number}

Returns the batteryLevel from the iOS Client Info Event. This is the the battery charge level for the device. This is integer value ranging from 1 to 100. If unable to fetch battery value -1 is returned.

Path is payload,deviceInfo,Battery level.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getCarrierName(source) → {string}

Returns the carrierName from the iOS Client Info Event. This is the represents the carrier name. "Unknown" if this value is not available, or not valid on the platform..

Path is payload,deviceInfo,Carrier name.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getDeviceName(source) → {string}

Returns the deviceName from the iOS Client Info Event. This is the read from Build.MODEL, which is the end-user-visible name for the end product..

Path is payload,deviceInfo,Device name.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getDeviceType(source) → {string}

Returns the deviceType from the iOS Client Info Event. This is the the style of interface to use on the current device..

Path is payload,deviceInfo,Device type.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getLocationAuth(source) → {string}

Returns the locationAuth from the iOS Client Info Event. This is the tells the app’s authorization status for using location services..

Path is payload,deviceInfo,Location authorization status.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getLocationEnabled(source) → {boolean}

Returns the locationEnabled from the iOS Client Info Event. This is the the current enabled/disabled state of location for the device..

Path is payload,deviceInfo,Location service enabled.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getLowPowerMode(source) → {boolean}

Returns the lowPowerMode from the iOS Client Info Event. This is the indicates whether Low Power Mode is enabled on an iOS device..

Path is payload,deviceInfo,Low power mode enabled.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getManufacturer(source) → {string}

Returns the manufacturer from the iOS Client Info Event. This is the the manufacturer of the product/hardware..

Path is payload,deviceInfo,Device manufacturer.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getOs(source) → {string}

Returns the os from the iOS Client Info Event. This is the the value is in the format "Android ".

Path is payload,deviceInfo,Operating system.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getPlatform(source) → {string}

Returns the platform from the iOS Client Info Event. This is the canonical name for the platform. Used for Griffon identifying if the device is iOS or Android.

Path is payload,deviceInfo,Canonical platform name.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) getScreenSize(source) → {string}

Returns the screenSize from the iOS Client Info Event. This is the phones display resolution in pixels (width x height).

Path is payload,deviceInfo,Screen size.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:

(static) isMatch(source) → {boolean}

Tests the provided source against the matcher to see if it's iOS Client Info Event event.

Parameters:
Name Type Description
source object

The iOS Client Info Event instance

Source:
See:
  • kit.isMatch

(static) make(…input) → {object}

Generates a iOS Client Info Event with the const values set. Can be useful in testing. Can provide additional data by providing a flat object of paths and values.

Parameters:
Name Type Attributes Description
input function <repeatable>

Overrides

Source:

(static) mock(…input) → {object}

Generates a iOS Client Info Event with some default values set. Can be useful in testing. Can override defaults and provide additional data by providing a flat object of paths and values.

Parameters:
Name Type Attributes Description
input function <repeatable>

Overrides

Source: