I have created an filter for android.net.conn.CONNECTIVITY_CHANGE.
I do receive intents to my broadcastreceiver.
My question is regarding what raises the connectivity_change.
The API description says:
A change in network connectivity has occurred. A connection has either
been established or lost. The NetworkInfo for the affected network is
sent as an extra; it should be consulted to see what kind of
connectivity event occurred.
It seems my broadcastreceiver is only called when mobile network is connected/disconnected (pdp is broken). It is not raised when for example 2g switches to 3g.
Can I not catch 2g to 3g swaps with this broadcastreceiver?
Do I have to use a phonestatelistener instead to catch swaps from e.g, 2g to 3g?
You need:
permission "android.permission.READ_PHONE_STATE"//to get connection changes (2G/3G/etc)permission "android.permission.ACCESS_COARSE_LOCATION"//to get Cell/Tower changesand