jpBattery

jpBattery

Information about the battery state and level
Version : 2.0
Price : $20
State : Outipadiphone

Downloads

Changelog

v2.0

  • Now compatible with ShiVa 2.0.
  • Compiled for Mac and Linux in addition to Windows, so you can now use it while working with ShiVa Editor for each of these operating systems.
  • Now uses a user token instead of an email to activate

v1.2

  • Optimized for ShiVa 1.9.2

v1.1

  • iOS library now universal (device+simulator)
  • iOS library now compatible with arm64 architecture (64 bits)

API

--jpBattery API jpBattery.activate ( sUserToken, sActivationKey ) nLevel = jpBattery.getLevel ( ) kBatteryState = jpBattery.getState ( ) bEnabled = jpBattery.isMonitoringEnabled ( ) jpBattery.setMonitoringEnabled ( bEnabled ) --Constants jpBattery.kBatteryStateCharging jpBattery.kBatteryStateFull jpBattery.kBatteryStateUnknown jpBattery.kBatteryStateUnplugged --User notification events: "onBatteryLevelDidChange" ( nLevel ) "onBatteryStateDidChange" ( kBatteryState )

Description

Get information about the battery. See if it is charging, full, or if the device is unplugged. Get the battery level and get notified when the battery state or level changes.

Requirements

  • The jpEventQueue plugin is required (free)