added isNetworkAvailable() and ACCESS_NETWORK_STATE permission