I’ve created an app which needs to be connected to a remote socket server at all time.
i’n order to do so I’ve registered a BroadcastReceiver for connectivity changes.
Every time the Receiver fires – the app is disconnecting from the server and creating a new connection.
it does that in order preserve a live and connected socket connection.
in my phone and few of the other phones I’ve checked it works great.
but i some other phones I’ve found out that when connected to the Mobile Provider data connection – the Receiver is being called very often without any real change in the connectivity.
is there a way for me to find out if there’s a real change in the connectivity? and besides, why the receiver fires so often ?
ok i found a solution for my problem, hope i will help someone else sometime:
in my BroadCast recevier for Connectivity Changes: