-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(extended-device-information): add Extended Device Info plugin (#…
…1980) * Added Cordova Device Information Wrapper * Updated Usage Description * Removed unsued line * Added Total Storage
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
src/@ionic-native/plugins/extended-device-information/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
|
||
} |