batteryState.*

Type Library
Revision Release 2024.3703
Keywords battery, batteryState
Platforms Android, iOS, macOS, Windows

Overview

The Battery State plugin enables battery monitoring support.

Syntax

local batteryState = require( "plugin.batteryState" )

Functions

batteryState.init()

batteryState.getState()

Events

batteryStateEvent

Project Settings

To use this plugin, add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

settings =
{
    plugins =
    {
        ["plugin.batteryState"] =
        {
            publisherId = "com.coronalabs"
        },
    },      
}