Комментарии:
2021-06-22: Saved my application! Thanks!
ОтветитьIt is only checking the Network not actually the internet
Ответитьdetect internet connection or network connection?
Ответитьpure gold, thanks master
ОтветитьWork fine and thank you sir lekin kya hm isko always track krne wala bna skte hai taki jaise hi data close ho app detected kr le plz sir reply
ОтветитьIt only checks if the phone is connected to a network. It doesn't check for the availability of internet.
ОтветитьThanks
ОтветитьAap se ek application bawana chahata hu 9519581688 Jo aap Ka charge hai batado
ОтветитьGracias we, me sirvió tu código :D
ОтветитьBhai ek bar run karke bhi dikha deta , to jyada maja aata
ОтветитьWho is too lazy to rewrite video:
private boolean haveNetwork() {
boolean have_WIFI = false;
boolean have_MobileData = false;
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo[] networkInfo = connectivityManager.getAllNetworkInfo();
for (NetworkInfo info:networkInfo) {
if (info.getTypeName().equalsIgnoreCase("WIFI")) {
if (info.isConnected()) {
have_WIFI = true;
}
}
if (info.getTypeName().equalsIgnoreCase("MOBILE")) {
if (info.isConnected()) {
have_MobileData = true;
}
}
}
return have_MobileData || have_WIFI;
}
hello sir i want to calculate the network latency time and rate in android can you help me please?
Ответитьit not working
Ответитьthank u soo much. its works fine
ОтветитьYou show the code, but don`t show working... I lose my time seeing it!
Ответитьhello bro whey else if ????? just else if statement ...... else
ОтветитьTip. If you share code, think you get more likes :P Atleast you got one like from me. Good work
ОтветитьHow to handle slow internet connection? Sometimes internet is connected but because of the slow network get/post request are not successful,
How to resolve it? Thanks
How I can check whether the connected network is having active network or not. This code will work when wifi or mobile data activated on the settings. But we need to check the actual availability of the network access.... When we are accessing some online resources like FireBase, the actual connectivity needed. Otherwise app will crash. If you have any solution for that?
Ответитьyou solved my problem
Ответить