I am android developer and need to check in my java code if the connection is active.
Is there any way to do this?
I use this class for the internet connection
do you mean to check if the vpn is up?
if the code enumerates all connections and you can make a decision off that, i don't think it would be a problem; but i am not familiar with the output available to know if that is feasible.
or if you can add another if to the segment so that if internet is available, does a specific name resolve?