add API and fix NPE in BigBattery gui