awesome-cordova-plugins/src/@ionic-native/plugins/extended-device-information/index.ts

50 lines
1.1 KiB
TypeScript
Raw Normal View History

import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';
/**
* @name Extended Device Information
* @description
2017-09-28 05:44:06 +08:00
* Retrieves additional device information that is not provided by other plugins
*
* @usage
* ```typescript
* import { ExtendedDeviceInformation } from '@ionic-native/extended-device-information';
*
*
* constructor(private extendedDeviceInformation: ExtendedDeviceInformation) { }
*
* ...
*
* console.log('The Memory is: ' + this.extendedDeviceInformation.memory);
* ```
*/
@Plugin({
pluginName: 'ExtendedDeviceInformation',
plugin: 'cordova-plugin-extended-device-information',
pluginRef: 'extended-device-information',
repo: 'https://github.com/danielehrhardt/cordova-plugin-extended-device-information',
platforms: ['Android']
})
@Injectable()
export class ExtendedDeviceInformation extends IonicNativePlugin {
2017-09-28 05:44:06 +08:00
/**
* Get the device's memory size
*/
@CordovaProperty
memory: number;
2017-09-28 05:44:06 +08:00
/**
* Get the device's CPU mhz
*/
@CordovaProperty
cpumhz: string;
2017-09-28 05:44:06 +08:00
/**
* Get the total storage
*/
@CordovaProperty
totalstorage: string;
}