I'm trying to register receiver, that will check VPN status. I have tried this: Get VPN Connection status on Android but looks like it no longer works on ICS. I have checked android source code for some clue, but with no luck, only noticed that in ISC there is nothing like: vpn.connectivity
and connection_state
- it use to be in android 2.3. Also tried using android.net.conn.CONNECTIVITY_CHANGE
as my IntentFilter
, but it doesn't react on VPN connection at all (of course I have added permission android.permission.ACCESS_NETWORK_STATE
).
I thought that it is simple thing to do, but I already run out of ideas how to do it... Could someone help me with this please?
May be you can try to poll for DNS server changes. If it has changed then VPN has connected. However, I think there could be a lot of exception to this rule.
How do you get the current DNS servers for Android?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With