If You are worry about when wifi is connected but no internet access. I searched a lot on web but there was not anyway that could work but finally I thought by myself that when some wifi name e.g default wifi name is connected and we mostly use more than one wifi networks with the same name then android sometimes inter mingles and it is not easy for android to find out. It mostly messes around and panic as well. Then I concieve a simple trick that 100% works. You just need to do this.
If You are worry about when wifi is connected but no internet access. I searched a lot on web but there was not anyway that could work but finally I thought by myself that when some wifi name e.g default wifi name is connected and we mostly use more than one wifi networks with the same name then android sometimes inter mingles and it is not easy for android to find out. It mostly messes around and panic as well. Then I concieve a simple trick that 100% works. You just need to do this.