API Reference 0.5.1+4rikulo_deviceDevice

Device class

The device.

class Device {
 js.Proxy _device;

 Device._internal() {
   js.scoped(() {
     _device = js.context.device;
     js.retain(_device);
   });
 }

 String get name => js.scoped(() => _device.name);
 String get cordova => js.scoped(() => _device.cordova);
 String get platform => js.scoped(() => _device.platform);
 String get uuid => js.scoped(() => _device.uuid);
 String get version => js.scoped(() => _device.version);

 void _onDeviceReady() {
   //TODO
 }

 void _onPause() {
   //TODO
 }

 void _onResume() {
   //TODO
 }

 void _onOnline() {
   //TODO
 }

 void _onOffline() {
   //TODO
 }

 void _onBackButton() {
   //TODO
 }

 void _onBatteryPause() {
   //TODO
 }

 void _onBatteryCritical() {
   //TODO
 }

 void _onBatteryLow() {
   //TODO
 }

 void _onBatteryStatus() {
   //TODO
 }

 void _onMenuButton() {
   //TODO
 }

 void _onSearchButton() {
   //TODO
 }

 void _onStartCallButton() {
   //TODO
 }

 void _onEndCallButton() {
   //TODO
 }

 void _onVolumeDownButton() {
   //TODO
 }

 void _onVolumeUpButton() {
   //TODO
 }

 void _registerDeviceEvents() {
   _addEventListener("pause", _onPause);
   _addEventListener("resume", _onResume);
   _addEventListener("online", _onOnline);
   _addEventListener("offline", _onOffline);
   _addEventListener("backbutton", _onBackButton);
   _addEventListener("batterycritical", _onBatteryCritical);
   _addEventListener("batterylow", _onBatteryLow);
   _addEventListener("batterystatus", _onBatteryStatus);
   _addEventListener("menubutton", _onMenuButton);
   _addEventListener("searchbutton", _onSearchButton);
   _addEventListener("startcallbutton", _onStartCallButton);
   _addEventListener("endcallbutton", _onEndCallButton);
   _addEventListener("volumedownbutton", _onVolumeDownButton);
   _addEventListener("volumeupbutton", _onVolumeUpButton);
 }
}

Properties

final String cordova #

String get cordova => js.scoped(() => _device.cordova);

final String name #

String get name => js.scoped(() => _device.name);

final String platform #

String get platform => js.scoped(() => _device.platform);

final String uuid #

String get uuid => js.scoped(() => _device.uuid);

final String version #

String get version => js.scoped(() => _device.version);