From f2f3741819bc5df6a05cb2cfcadfd4d591b8c138 Mon Sep 17 00:00:00 2001 From: mhartington Date: Fri, 1 Jul 2016 15:46:15 -0400 Subject: [PATCH] docs(backgroundMode): improve docs --- src/plugins/backgroundmode.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/plugins/backgroundmode.ts b/src/plugins/backgroundmode.ts index ab9e5a0e9..59afd65a2 100644 --- a/src/plugins/backgroundmode.ts +++ b/src/plugins/backgroundmode.ts @@ -8,9 +8,22 @@ import {Plugin, Cordova} from './plugin'; *@usage * ```js * import {BackgroundMode} from 'ionic-native'; -* +* * BackgroundMode.enable(); * ``` +* +* @advanced +* +* Configuration options +* +* | Property | Type | Description | +* |----------|-----------|------------------------------------------------------------------------------| +* | title | `string` | Title of the background task. Optional | +* | ticker | `string` | The text that scrolls itself on the statusbar. Optional | +* | text | `string` | Description of the background task. Optional | +* | silent | `boolean` | If the plugin will display a notification or not. Default is false. Optional | +* | resume | `boolean` | Bring the app into the foreground if the notification is tapped. Optional | +* */ @Plugin({ plugin: 'de.appplant.cordova.plugin.background-mode', @@ -37,11 +50,14 @@ export class BackgroundMode { /** * Checks if background mode is enabled or not. + * @returns {boolean} returns a true of false if the background mode is enabled. */ @Cordova() static isEnabled(): Promise {return; } + /** * Can be used to get the information if the background mode is active. + * @returns {boolean} returns tru or flase if the background mode is active. */ @Cordova() static isActive(): Promise {return; } @@ -49,6 +65,7 @@ export class BackgroundMode { /** * Override the default title, ticker and text. * Available only for Android platform. + * @param {Configure} options List of option to configure. See table below */ @Cordova({ platforms: ['Android'] @@ -58,11 +75,13 @@ export class BackgroundMode { /** * Modify the displayed information. * Available only for Android platform. + * @param {Configure} options Any options you want to update. See table below. */ @Cordova({ platforms: ['Android'] }) static update(options?: Configure): void {} + /** * Sets a callback for a specific event * Can be used to get notified or run function when the background mode has been activated, deactivated or failed.