fix 1 StringBuilder for emergency text, if "Battery Fully Charged" is the only text in the stringIdList, then StringBuilder will be empty and delete last char will cause index boundary error, now checks if sb is empty.
     2 remove close connection in the onStop() in BaseActivity
 update
 1 increase version to 0.8.2
 2 add a flag in the base activity to check if activity is in foreground and visible to user
 3 DeviceAutoRefresh now checks if the activity is visible