Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Extended Device Information #1980

Merged
merged 4 commits into from
Sep 27, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 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,40 @@
import { Injectable } from '@angular/core';
import { CordovaProperty, Plugin, IonicNativePlugin } from '@ionic-native/core';

declare const window: any;
Copy link
Collaborator

@ihadeed ihadeed Sep 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not needed. declare const window: any;


/**
* @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: string;

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

}