Skip to content

Commit

Permalink
feat(extended-device-information): add Extended Device Info plugin (#…
Browse files Browse the repository at this point in the history
…1980)

* Added Cordova Device Information Wrapper

* Updated Usage Description

* Removed unsued line

* Added Total Storage
  • Loading branch information
Daniel Ehrhardt authored and ihadeed committed Sep 27, 2017
1 parent 432c0e9 commit 806766e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/@ionic-native/plugins/extended-device-information/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';

/**
* @name Extended Device Information
* @description
*
* @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 {

/** Get the device's memory size. */
@CordovaProperty
memory: number;

/** Get the device's CPU mhz. */
@CordovaProperty
cpumhz: string;

/** Get the device's CPU mhz. */
@CordovaProperty
totalstorage: string;

}

0 comments on commit 806766e

Please sign in to comment.