MobileICP3 - Nikii1118/Web-Programming- GitHub Wiki
Nikita Goyal
Class ID-10
TASK
Earthquake Info App:
Create a mobile application with the following requirements
The main activity should be a list of earthquakes with information as shown below:
-
On clicking any item Earthquake, the user must be directed to the webpage of USGS which contains further information about the earthquake in the web browser.
-
Follow all the three TODO instructions in the QueryUtils.javafile and two more TODO instructions in the EarthquakeActivity.javafile and AndroidManifest.xmlto complete the functionality
Given API: Earthquake API
CODE:
Android Manifest.xml
- In this file, we are adding internet permissions.
Queryutils.java
- Create the URL GEt Request.
- Open the connection
- Parsing the json string
- Fetched the values of msg,time,place and url
- API URL to fetch the request from USGS
- Create a new intent to view the earthquake API
OUTPUT
Earthquake APP
1. Showing list of earthquakes
2. Redirecting to USGS website
3. USGS website for more information