The battery interrupt code above is built into device OS now, and it's much better to get the is battery powered state from device diagnostics. This code can be used instead of the code above:
The battery interrupt code above is built into device OS now, and it's much better to get the is battery powered state from device diagnostics. This code can be used instead of the code above: