Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

check if there is connexion android studio

public boolean isInternetAvailable() {
    try {
        InetAddress ipAddr = InetAddress.getByName("google.com"); 
        //You can replace it with your name
            return !ipAddr.equals("");

        } catch (Exception e) {
            return false;
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #connexion #android #studio
ADD COMMENT
Topic
Name
7+1 =