I set up my receiver like this:
networkReceiver = new NetworkChangesReceiver();
IntentFilter connFilter = new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION);
registerReceiver(networkReceiver, connFilter);
I'd like to make the setup in manifest file. However, I can't find CONNECTIVITY_ACTION among android attributes for intent filter...
edit: I managed to find it, but on manifest I get this warning: "Exported receiver does not require permission" And this is not true as I have this line as well: and, by debugging, I see that receiver is perfectly working and no "missing permissions" exception is ever thrown.