Skip to content

Instantly share code, notes, and snippets.


Mohamed AbdelraZek MohamedAbdelrazek

Block or report user

Report or block MohamedAbdelrazek

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
MohamedAbdelrazek /
Created May 18, 2019
Check Network Connectivity in android
package com.mobotechnology.bipinpandey.mvp_hand_dirty.main_activity.broadCastReciever;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.util.Log;
MohamedAbdelrazek /
Last active Sep 27, 2017
Mercury Engineering and Consultation Task
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
package javaapplication4;
import java.util.ArrayList;
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query
You can’t perform that action at this time.