refactored BroadcastReceiver and handling of requestPermission