0.0.21 • Published 7 months ago

@types/cordova-plugin-background-mode v0.0.21

Weekly downloads
319
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/cordova-plugin-background-mode

Summary

This package contains type definitions for Apache Background Mode plugin (https://github.com/katzer/cordova-plugin-background-mode).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cordova-plugin-background-mode.

index.d.ts

// Type definitions for Apache Background Mode plugin
// Project: https://github.com/katzer/cordova-plugin-background-mode
// Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
 * The plugin prevent the app from going to sleep while in background
 */
interface CordovaPluginBackgroundMode {

  /**
   * The background mode can be enabled
   */
  enable(): void;
  /**
   * The background mode can be disabled
   */
  disable(): void;
  /**
   * Checks if the background mode is enabled or not
   */
  isEnabled(): boolean;
  /**
   * Checks if the background mode is activated or not
   */
  isActivated(): boolean;
  /**
   * Function to get notified when the background mode has been activated
   */
  onactivate(): void;
  /**
   * Function to get notified when the background mode has been deactivated
   */
  ondeactivate(): void;
  /**
   * Function to get notified when the background could not benn activated
   */
  onfailure(callback: (errorCode: number) => void): void;
  /**
   * Customize default title, ticker and text for the notification
   */
  setDefaults(item: ICordovaPluginBackgroundModeNotificationItem): void;
  /**
   * Configure the default background notification
   */
  configure(item: ICordovaPluginBackgroundModeNotificationItem): void;
}

interface ICordovaPluginBackgroundModeNotificationItem {

  /**
   * The title of the notification displayed in background mode
   */
  title?: string | undefined,
  /**
   * The ticker of the notification displayed in background mode
   */
  ticker?: string | undefined,
  /**
   * The body of the notification displayed in background mode
   */
  text?: string | undefined,
  /**
   * Handles if app is coming to foreground when tapping on the notification
   */
  resume?: boolean | undefined,
  /**
   * Handles if there is a notification when background is activated
   */
  silent?: boolean | undefined
}

interface CordovaPlugins {

  backgroundMode: CordovaPluginBackgroundMode
}

Additional Details

  • Last updated: Thu, 23 Dec 2021 23:34:26 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by DefinitelyTyped.

0.0.20

7 months ago

0.0.21

7 months ago

0.0.19

9 months ago

0.0.18

2 years ago

0.0.17

3 years ago

0.0.16

4 years ago

0.0.15

8 years ago

0.0.14

8 years ago

0.0.13-alpha

8 years ago

0.0.12-alpha

8 years ago

0.0.11-alpha

8 years ago

0.0.10-alpha

8 years ago

0.0.9-alpha

8 years ago

0.0.8-alpha

8 years ago

0.0.3-alpha

8 years ago

0.0.2-alpha

8 years ago