It is probably much easier to store your Application or Activity instance somewhere in your Java code (e.g. in the activities onCreate()).
Then use something like Cocos2dActivity.sharedInstance().getContext() within your isNetworkAvailable() function.