This class can be used for retrieve the connectivity manager and for maintain checked the connectivity status.
This class inherit from the ScChecker.
Through the listener implementation you can know when the connectivity status changed.
PERMISSIONS This classes need of network user permission. Please remember to add the follow line on your manifest:
- ConnectivityManager getConnectivityManager()
Return the connectivity manager when available. - boolean isWifiEnabled()
true
if the wifi connection is enabled. - boolean isMobileEnabled()
true
if the mobile connection is enabled. - boolean check()
true
if at least one connection is enabled.
For an example please take a look the demo section in the project structure.
#License
Copyright 2015 Samuele Carassai Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.