com.octo.android.robospice.networkstate
Interface NetworkStateChecker

All Known Implementing Classes:
DefaultNetworkStateChecker

public interface NetworkStateChecker

Defines the responsability of an entity that checks the network state. It can be passed to the RequestProcessor to determine if network is available or not and to determine if requests should be processed or not. NetworkStateChecker are also in charge of checking required permission to determine the network state and network usage.

Author:
sni

Method Summary
 void checkPermissions(android.content.Context context)
          Check if all permissions necessary to determine network state and use network are granted to a given context.
 boolean isNetworkAvailable(android.content.Context context)
          Determine whether network is available or not.
 

Method Detail

isNetworkAvailable

boolean isNetworkAvailable(android.content.Context context)
Determine whether network is available or not.

Parameters:
context - the context from which network state is accessed.
Returns:
a boolean indicating if network is considered to be available or not.

checkPermissions

void checkPermissions(android.content.Context context)
Check if all permissions necessary to determine network state and use network are granted to a given context.

Parameters:
context - the context that will be checked to see if it has all required permissions.


Copyright © 2012-2014. All Rights Reserved.