Device
Handle operation on device sensor.
Usage
device
keyword is needed to instanciate this sting.
var device = require('device');
Data accessors
- board
- brand
- cpuAbi
- device
- display
- manufacturer
- model
- os
- product
- resolution
- rotation
- screenSize
- timestamp
- versionRelease
- versionSdk
Methods
Full Example
var device = require('device');
var recorder = require('recorder');
var dataResult = device.data();
recorder.save({
'board' : device.board(),
'brand' : device.brand(),
'cpuAbi' : device.cpuAbi(),
'device' : device.device(),
'display' : device.display(),
'manufacturer' : device.manufacturer(),
'model' : device.model(),
'os' : device.os(),
'product' : device.product(),
'resolution' : device.resolution(),
'rotation' : device.rotation(),
'screenSize' : device.screenSize(),
'timestamp' : device.timestamp(),
'versionRelease' : device.versionRelease(),
'versionSdk' : device.versionSdk(),
'json' : device.data()
});
board
Retrieve the The name of the underlying board, like “goldfish”.
board();
Parameters
- None.
Return
- board : String, The name of the underlying board, like “goldfish”
brand
Retrieve the The consumer-visible brand with which the product/hardware will be associated, if any.
brand();
Parameters
- None.
Return
- brand : String, The consumer-visible brand with which the product/hardware will be associated, if any
cpuAbi
Retrieve the The name of the instruction set (CPU type + ABI convention) of native code.
cpuAbi();
Parameters
- None.
Return
- cpuAbi : String, The name of the instruction set (CPU type + ABI convention) of native code
device
Retrieve the The name of the industrial design.
device();
Parameters
- None.
Return
- device : String, The name of the industrial design
display
Retrieve the A build ID string meant for displaying to the user.
display();
Parameters
- None.
Return
- display : String, A build ID string meant for displaying to the user
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)
product
Retrieve the The name of the overall product.
product();
Parameters
- None.
Return
- product : String, The name of the overall product
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.
versionRelease
Retrieve the The user-visible version string. E.g., “1.0” or “3.4b5”.
versionRelease();
Parameters
- None.
Return
- versionRelease : String, The user-visible version string. E.g., “1.0” or “3.4b5”
versionSdk
Retrieve the The user-visible SDK version of the framework.
versionSdk();
Parameters
- None.
Return
- versionSdk : Integer, The user-visible SDK version of the framework
data
Returns every available seed.
data();
Parameters
- None.