Implementation of the BroadcastReceiver