Implemented a template for the Broadcast Receiver used to detect when the power is plugged or unplugged.