If you're interested in how that method works, then you can view the source code for it.
CONNECTIVITY_SERVICE is simply an integer value passed in to the method, which is used to lookup the correct service object. As I say, to understand exactly how it's doing this, you need to look at the source code.
"CONNECTIVITY_SERVICE
Use with getSystemService(Class) to retrieve a ConnectivityManager for handling management of network connections."
getSystemService returns a ConnectivityManager-Object which is choosen by string argument as identifier. Would bet that CONNECTIVITY_SERVICE refers to an item in an enum, but not sure. Basically its an identifier.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.