Skip to content

Commit

Permalink
feat(plugin): add MS App Center LowMemory plugin (#3619)
Browse files Browse the repository at this point in the history
* feat(plugin): add MS App Center LowMemory plugin

* refactor(app-center-low-memory): plugin decorator
  • Loading branch information
johnborges authored Apr 5, 2021
1 parent 46d0cec commit 2cb5f5c
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/@ionic-native/plugins/app-center-low-memory/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Injectable } from '@angular/core';
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';

/**
* @name App Center Low Memory
* @description
* Generates a low memory warning.
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
*
* @usage
* ```typescript
* import { LowMemory } from '@ionic-native/app-center-low-memory/ngx';
*
* ...
*
* constructor(private lowMemory: LowMemory) { }
*
* async warning() {
* await this.lowMemory.generateLowMemory();
* }
* ```
*/
@Plugin({
pluginName: 'LowMemory',
plugin: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory',
pluginRef: 'LowMemory',
repo: 'https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory',
platforms: ['Android', 'iOS'],
})
@Injectable()
export class LowMemory extends IonicNativePlugin {
/**
* Generates a low memory warning.
* For more info, please see: https://github.com/Microsoft/appcenter-sdk-cordova/tree/master/cordova-plugin-appcenter-generate-low-memory
* @returns {Promise<void>}
*/
@Cordova()
generateLowMemory(): Promise<void> {
return;
}
}

0 comments on commit 2cb5f5c

Please sign in to comment.