The blackberry.system.event API can be used to monitor system events, such as when the battery level changes.