Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Window

Global object StatusBar.

Hierarchy

  • Window

Index

Properties

PERSISTENT

PERSISTENT: number

StatusBar

StatusBar: StatusBar

TEMPORARY

TEMPORARY: number

onbatterycritical

onbatterycritical: function

Type declaration

onbatterylow

onbatterylow: function

Type declaration

onbatterystatus

onbatterystatus: function

Type declaration

Methods

addEventListener

  • addEventListener(type: batteryEvent, listener: function, useCapture?: boolean): void
  • addEventListener(type: "statusTap", listener: function, useCapture?: boolean): void
  • Adds a listener for an event from the BatteryStatus plugin.

    Parameters

    • type: batteryEvent

      The event to listen for.

                      `batterystatus`: event fires when the percentage of battery charge changes by at least 1 percent, or if the device is plugged in or unplugged.
      
                      `batterycritical`: event fires when the percentage of battery charge has reached the critical battery threshold. The value is device-specific.
      
                      `batterylow`: event fires when the percentage of battery charge has reached the low battery threshold, device-specific value.
    • listener: function

      The function that executes when the event fires. The function is passed an BatteryStatusEvent object as a parameter.

    • Optional useCapture: boolean

      A Boolean indicating whether events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree.

    Returns void

  • Parameters

    • type: "statusTap"
    • listener: function
        • (ev: Event): any
        • Parameters

          • ev: Event

          Returns any

    • Optional useCapture: boolean

    Returns void

removeEventListener

  • removeEventListener(type: batteryEvent, listener: function, useCapture?: boolean): void
  • Removes a listener for an event from the BatteryStatus plugin.

    Parameters

    • type: batteryEvent
    • listener: function
    • Optional useCapture: boolean

      A Boolean indicating whether events of this type will be dispatched to the registered listener before being dispatched to any EventTarget beneath it in the DOM tree.

    Returns void

requestFileSystem

  • requestFileSystem(type: LocalFileSystem, size: number, successCallback: function, errorCallback?: function): void
  • Requests a filesystem in which to store application data.

    Parameters

    • type: LocalFileSystem

      Whether the filesystem requested should be persistent, as defined above. Use one of TEMPORARY or PERSISTENT.

    • size: number

      This is an indicator of how much storage space, in bytes, the application expects to need.

    • successCallback: function

      The callback that is called when the user agent provides a filesystem.

    • Optional errorCallback: function

      A callback that is called when errors happen, or when the request to obtain the filesystem is denied.

    Returns void

resolveLocalFileSystemURI

  • resolveLocalFileSystemURI(uri: string, successCallback: function, errorCallback?: function): void
  • Look up file system Entry referred to by local URI.

    Parameters

    • uri: string
    • successCallback: function

      invoked with Entry object corresponding to URI

        • Parameters

          Returns void

    • Optional errorCallback: function

      invoked if error occurs retrieving file system entry

    Returns void

resolveLocalFileSystemURL

  • resolveLocalFileSystemURL(url: string, successCallback: function, errorCallback?: function): void
  • Look up file system Entry referred to by local URL.

    Parameters

    • url: string
    • successCallback: function

      invoked with Entry object corresponding to URL

        • Parameters

          Returns void

    • Optional errorCallback: function

      invoked if error occurs retrieving file system entry

    Returns void