replace the following code in receiver class, u need to check for one more condition isAvailable() inside if.
ConnectivityManager connectivityManager=(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo activeNetInfo=connectivityManager.getActiveNetworkInfo();
if(activeNetInfo!=null && activeNetInfo.isAvailable() && activeNetInfo.isConnected())
{
Toast.makeText(context, "Internet Connection is Active", Toast.LENGTH_LONG).show();
}
else{
Toast.makeText(context, "Internet Connection Timed Out! Please Try Again!!", Toast.LENGTH_LONG).show();
}