From 2ac52822b8d37141f7f5f2ee755dc23fc115a8f3 Mon Sep 17 00:00:00 2001 From: Daniel Ehrhardt Date: Thu, 16 Aug 2018 21:55:51 +0200 Subject: [PATCH] fix(extended-device-information): Fixed Memory Display Bug (#2641) * Fixed Memory Display Bug with ExtendedDeviceInformation Plugin * Update index.ts * Update index.ts --- .../extended-device-information/index.ts | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/@ionic-native/plugins/extended-device-information/index.ts b/src/@ionic-native/plugins/extended-device-information/index.ts index 2a4b3110a..2226ddbd1 100644 --- a/src/@ionic-native/plugins/extended-device-information/index.ts +++ b/src/@ionic-native/plugins/extended-device-information/index.ts @@ -4,7 +4,11 @@ import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core'; /** * @name Extended Device Information * @description - * Retrieves additional device information that is not provided by other plugins + * Retrieves additional device information from the Device Hardware + * - memory + * - cpumhz + * - totalstorage + * - freestorage * * @usage * ```typescript @@ -22,23 +26,23 @@ import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core'; pluginName: 'ExtendedDeviceInformation', plugin: 'cordova-plugin-extended-device-information', pluginRef: 'extended-device-information', - repo: 'https://github.com/danielehrhardt/cordova-plugin-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; + memory: string; /** * Get the device's CPU mhz */ @CordovaProperty - cpumhz: string; + cpumhz: number; /** * Get the total storage @@ -46,4 +50,9 @@ export class ExtendedDeviceInformation extends IonicNativePlugin { @CordovaProperty totalstorage: string; + /** + * Get the total storage + */ + @CordovaProperty + freestorage: number; }