Find out how to build a simple Whats The Weather app. Author Melvin Kisten tackles AsyncTask, JSONArray, InputStream, HttpURLConnection classes and APIs.
-
Make sure you have these installed
-
Clone this repository into your local machine using the terminal (mac) or Gitbash (PC)
> git clone https://github.com/iammelvink/whats-the-weather.git
-
Vist Open Weather Map and Sign Up or Sign In if you already have an account
-
Copy your API key from Open Weather Map and paste at file :
app\src\main\java\com\iammelvink\whatstheweather\MainActivity.java
at the line where you see thisYOUR_API_KEY
:task.execute("http://api.openweathermap.org/data/2.5/weather?q=" + searchCity + "&APPID=YOUR_API_KEY").get();
-
Run Android Studio and choose Open an existing Android Sudio project
-
Press play button to run the app
Check out some of my other stuff on iammelvink. Follow me on Twitter and Instagram, or check out my YouTube channel.