Handle operation on device sensor.

Usage

device keyword is needed to instanciate this sting.

var device = require('device');

Data accessors

Methods

Full Example

var device = require('device');
var recorder = require('recorder');

var dataResult = device.data();


recorder.save({
    'manufacturer' : device.manufacturer(),
    'model' : device.model(),
    'os' : device.os(),
    'resolution' : device.resolution(),
    'rotation' : device.rotation(),
    'screenSize' : device.screenSize(),
    'timestamp' : device.timestamp(),
    'version' : device.version(),
    'json' : device.data()
});

manufacturer

Retrieve the Identity of the phone manufacturer.

manufacturer();

Parameters

  • None.

Return

  • manufacturer : String, Identity of the phone manufacturer

model

Retrieve the Model of the phone.

model();

Parameters

  • None.

Return

  • model : String, Model of the phone

os

Retrieve the Operating system of the device, (e.g. iOS, Android).

os();

Parameters

  • None.

Return

  • os : String, Operating system of the device, (e.g. iOS, Android)

resolution

Retrieve the Resolution of the screen.

resolution();

Parameters

  • None.

Return

  • resolution : String, Resolution of the screen

rotation

Retrieve the Rotation in degrees of the screen.

rotation();

Parameters

  • None.

Return

  • rotation : Integer, Rotation in degrees of the screen

screenSize

Retrieve the Diagonal size of the screen in inches.

screenSize();

Parameters

  • None.

Return

  • screenSize : Double, Diagonal size of the screen in inches

timestamp

Retrieve the represents the time of the operation..

timestamp();

Parameters

  • None.

Return

  • timestamp : Long, represents the time of the operation.

version

Retrieve the Current version of the operating system.

version();

Parameters

  • None.

Return

  • version : String, Current version of the operating system

data

Returns every available seed.

data();

Parameters

  • None.

Returns