connecting your android application to cloud
TRANSCRIPT
HTTP REQUEST
1. Make HTTP Reuest to the URL2. Read the response from the input stream3. Clean and log any erros
a. Close any input streams
The gist code is here
https://gist.github.com/udacityandroid/d6a7bb21904046a91695
OPEN WEATHER MAP API KEYS
This link will tell you how to use your API key to make requests.
THREADS
Android by default, runs on the main thread also calle the UI thread.
Handles user input and output.
Hence we don’t want o do any task on the main thread that will slow it
ASYNC TASK
Check out the Google Android guide on threading here.
WHY ASYNC TASK IS NOT OPTIMAL
Always seek to eliminate the manual refresh button
A good app should provide the user with data even before he asks