// Path: Networking/app/src/main/java/qa/edu/qu/cse/cmps312/networking/Consts/Consts.java
// public class Consts {
//     // Get your user name at http://www.geonames.org/login
//     public static final String USERNAME = "insert_username";
//     public static final String URL = "http://api.geonames.org/earthquakesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&username=";
//     public static final String URLXML = "http://api.geonames.org/earthquakes?north=44.1&south=-9.9&east=-22.4&west=55.2&username=";
// }


import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import qa.edu.qu.cse.cmps312.networking.Consts.Consts;
package qa.edu.qu.cse.cmps312.networking;





public class NetworkingJSONActivity extends AppCompatActivity {

    ListView mListView;
    TextView mTextview;
    ProgressBar mProgressBar;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_networking_json);
        mListView = (ListView)findViewById(R.id.listView);
        mProgressBar = (ProgressBar)findViewById(R.id.progressBar);
        mTextview = (TextView)findViewById(R.id.textView1);
// Path: Networking/app/src/main/java/qa/edu/qu/cse/cmps312/networking/Consts/Consts.java
// public class Consts {
//     // Get your user name at http://www.geonames.org/login
//     public static final String USERNAME = "insert_username";
//     public static final String URL = "http://api.geonames.org/earthquakesJSON?north=44.1&south=-9.9&east=-22.4&west=55.2&username=";
//     public static final String URLXML = "http://api.geonames.org/earthquakes?north=44.1&south=-9.9&east=-22.4&west=55.2&username=";
// }


// Path: Networking/app/src/main/java/qa/edu/qu/cse/cmps312/networking/NetworkingJSONActivity.java
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import qa.edu.qu.cse.cmps312.networking.Consts.Consts;

package qa.edu.qu.cse.cmps312.networking;





public class NetworkingJSONActivity extends AppCompatActivity {

    ListView mListView;
    TextView mTextview;
    ProgressBar mProgressBar;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_networking_json);
        mListView = (ListView)findViewById(R.id.listView);
        mProgressBar = (ProgressBar)findViewById(R.id.progressBar);
        mTextview = (TextView)findViewById(R.id.textView1);
        new HttpGetTask().execute(Consts.URL + Consts.USERNAME);