Skip to content

Instantly share code, notes, and snippets.

Avatar

Chandradeep Anand chandradeep01

  • Tata Consultancy Services(TCS)
  • kanchrapara,kolkata
View GitHub Profile
View sunshineapp
public class FetchWeatherTask extends AsyncTask<Void,Void,Void> {
private final String LOG_TAG = FetchWeatherTask.class.getSimpleName();
@Override
protected Void doInBackground(Void... params) {
// 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.