You are registering the BroadcastReceiver
in DeviceScanActivity.java which means it won't be registered until DeviceScanActivity is active.
In other words the broadcast will simply get lost because there isn't a receiver available to receive the broadcast.