You are on page 1of 29

lOMoARcPSD|34356505

Weather Forcasting APP Project Report

IT essentials (RMIT University)

Studocu is not sponsored or endorsed by any college or university


Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)
lOMoARcPSD|34356505

WEATHER FORCASTING APP


A PROJECT REPORT
ON
WEATHER FORCASTING APP
(USING ANDROID STUDIO)

SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR THE AWARD OF


THE DEGREE OF

BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING

SUBMITTED BY
Name of Student University Roll No.
Saprem Aditya 19-B.CSE-225

RIMT UNIVERSITY, MANDIGOBINDGARH,


PUNJAB (147301)
NOVEMBER 2022

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

CANDIDATE’S DECLARATION

I hereby certify that the project entitled WEATHER FORCASTING APP (USING ANDROID STUDIO)
submitted by SAPREM ADITYA 19-B.CSE-225 in partial fulfilment of the requirement for the
award of degree of the B.Tech (Computer Science & Engineering) submitted in Department of
Computer Science & Engineering at RIMT University, Mandi Gobindgarh is an authentic record
of my own work carried out during a period from July 2022 to Nov 2022. The matter presented
in this project has not formed the basis for the award of any other, diploma, fellowship or any
other similar titles.

Signature of the Student


Place:
Date:

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

CERTIFICATE

This is to certify that the project titled WEATHER FORCASTING APP (USING ANDROID STUDIO)
is the bonafide work carried out by SAPREM ADITYA 19-B.CSE-225 in partial fulfilment of the
requirement for the award of degree of B.Tech (Computer Science & Engineering) submitted in
Department of Computer Science & Engineering, at RIMT University , Mandi Govindgarh is an
aunthentic record of my own work carried out during a period from Jul 2022 to Nov 2022 under
the guidance of (Prof. Mr. Jasdeep Singh (Asst. Professor) Department of Computer Science &
Engineering). The Major Project Viva- Voice Examination has been held on 23-11-2022.

Signature of the Guide Signature of the HOD


(Dept. of CSE)

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

ABSTRACT

Weather forecasting is the application of science and technology to predict the state of the
atmosphere for a given location. Ancient weather forecasting methods usually relied on
observed patterns of events, also termed pattern recognition. For example, it might be
observed that if the sunset was particularly red, the following day often brought fair weather.
However not all of these predictions prove reliable.

Here this system will predict weather based on parameters such as temperature, humidity and
wind. User will enter current temperature; humidity and wind, System will take this parameter
and will predict weather (rainfall in inches) from previous data in database(dataset). The role of
the admin is to add previous weather data in database, so that system will calculate weather
(estimated rainfall in inches) based on these data. Weather forecasting system takes
parameters such as temperature, humidity, and wind and will forecast weather based on
previous record therefore this prediction will prove reliable. This system can be used in Air
Traffic, Marine, Agriculture, Forestry, Military, and Navy etc.

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

ACKNOWLWDGEMENT

It is my pleasure to be indebted to various people, who directly or indirectly contributed in the


development of this work and who influenced my thinking, behavior and acts during the course
of study.

I am thankful to Mr. JASDEEP SINGH for his support, co-operation and motivation provided to
me during the project development, for constant inspiration, presence and blessings.

I am extremely thankful to Dr. ASHISH OBEROI (HOD CSE Dept.), for valuable suggestion and
encouragement.

Lastly, I would like to thank the almighty and my parents for their moral support and my friends
with whom I shared my day-to-day experience and received lots of suggestions that improved
my quality of work.

Signature of Student
Saprem Aditya
23-11-2022

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

TABLE OF CONTENTS

TITLE…………………………………………………………………………………………… PAGE NO.


CANDIDATE’S DECLARATION…………………………………………………………………………… 2
CERTIFICATE……………………………………………………………………………………………………. 3
ABSTRACT……………………………………………………………………………………………………….. 4
ACKNOWLEDGEMENT……………………………………………………………………………………… 5
LIST OF FIGURES……………………………………………………………………………………………… 7

CHAPTER 1 INTRODUCTION………………………………………………… 8-9

1.1 OVERVIEW……………………………………………………………………….. 8
1.2 PROJECT AIM…………………………………………………………………… 9

CHAPTER 2 IMPLEMENTATION……………………………………………. 10-18

2.1 ABOUT ANDROID STUDIO………………………………………………. 10-11


2.2 ABOUT JAVA…………………………………………………………………… 12-13
2.3 XML……………………………………………………………………………….. 13-16
2.4 JSON……………………………………………………………………………… 16
2.5 API…………………………………………………………………………………. 17-18

CHAPTER 3 PROJECT WORK……………………………………………….. 19-14

3.1 DEVELOPING A MOBILE ANDROID APPLICATION FOR 19


WEATHER FORCASTING…………………………………………………..
3.2 CREATE WEATHER FORCASTING APP IN ANDROID 19-21
STUDIO…………………………………………………………………………….
3.3 CODE……………………………………………………………………………….. 22-23
3.4 HTTPREQUEST.JAVA…………………………………………………………. 23-24

CHAPTER 4 OUTPUT & SNAPSHOTS……………………………………. 25-26

4.1 OUTPUT………………………………………………………………………….. 25-26

CHAPTER 5 CONCLUSION……………………………………………………. 27
CHAPTER 6 REFERANCES…………………………………………………….. 28

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

LIST OF FIGURES

FIGURE NO. TITLE………………………………………………………………….. PAGE NO.


1. ANDROID STUDIO INTERFACE…………………………………………… 11
2. DEVELOPMENT ENVIRONMENT ANDROID STUDIO…………… 19
3. ANDROID STUDIO……………………………………………………………… 20
4. FRONT END………………………………………………………………………. 22
5. DESIGNING FRONT END……………………………………………………. 24
6. OUTPUT 1…………………………………………………………………………. 25
7. OUTPUT 2…………………………………………………………………………. 26

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

1. INTRODUCTION

Weather forecasting is the application of science and technology to predict the conditions of
the atmosphere for a given location and time. Weather forecasts are made by collecting
quantitative data about the current state of the atmosphere at a given place and using
meteorology to project how the atmosphere will change. The role of Technology has been
remarkable in the field of weather forecasting. Weather data is not only necessary for
researchers or scientists, ordinary people can be benefitted from it as well. People nowadays
are feeling the necessity of weather data as well. There are a variety of weather mobile apps in
Google Play and the App store. Those apps have great features and functionalities to satisfy
users. However, only a few of them have friendly user interface and human centered
interactions, which means that a lot of them might be difficult to be navigated even though
they provide enough functionalities. It is not convenient for new users. Therefore, we would
like to do improvements on weather mobile apps. It is basically for Apple smart phones and
tablets.

1.1 OVERVIEW

The project, the “WEATHER FORCASTING APP” is a cutting edge and versatile Weather
application fundamentally designed to help people to travel long distances connect with their
near place ones in a very friendly, easy and hassle-free manner. This application is compatible
with all the Android versions. And with said that, anyone owing their own android phone, the
Weather Report application can create a huge difference in hooking them up with others
provided, they also have the same application loaded on their device or PC. It is very simple to
use and easy to install that can be downloaded directly. When it comes to the features, they all
are extremely engaging and they keep updating periodically back to back. The extent of fun in
using this Weatherapplication is beyond comparison. This application is highly accommodative
for quick technological updates and integration. The application will have the features like
providing Forecast, Humidity, Pressure etc. It also provides Forecast Weather for 7 Days all
over the world.

In today’s busy routine life, the users of this Weather Report application will be just a click away
to access all the basic requirements in today’s day to day routine of the humans. The users will
have access to the latest Weather updates i.e. the burning Weather in all around the world.
Secondly, the users will have the access to the weather forecast before going out of their home
with the support of the GPS in their smart-phones. Compared to the other applications this
Weather Report application will prove to be an amazing user friendly application with lots of
more features.

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

1.2 PROJECT AIM


To make areal time weather application that takes user’s exact location and provides
weather forecast for the day and upcoming days also. We also tried to design a simple
but visual UI that provides comprehensive data. Also, the application provides
suggestions to users based on weather conditions. And lastly, user can search and
access data for custom locations (string based).

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

2. IMPLEMENTATION

2.1 ABOUT ANDROID STUDIO

Android Studio is the official Integrated Development Environment (IDE) for android
application development. Android Studio provides more features that enhance our
productivity while building Android apps. Android Studio was announced on 16th May
2013 at the Google I/O conference as an official IDE for Android app development. It
started its early access preview from version 0.1 in May 2013. The first stable built version
was released in December 2014, starts from version 1.0.

Since 7th May 2019, Kotlin is Google's preferred language for Android application
development. Besides this, other programming languages are supported by Android
Studio.

FEATURES OF ANDROID STUDIO


• It has a flexible Gradle-based build system.

• It has a fast and feature-rich emulator for app testing.

• Android Studio has a consolidated environment where we can develop for all Android
devices.

• Apply changes to the resource code of our running app without restarting the app.

• Android Studio provides extensive testing tools and frameworks.

• It supports C++ and NDK.

• It provides build-in supports for Google Cloud Platform. It makes it easy to integrate
Google Cloud Messaging and App Engine.

ANDROID STUDIO USER INTERFACE


The Android Studio main window contains the several logical areas which are shown in the
below figure:

10

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

Figure 1. Android Studio Interface

1. The toolbar provides us a wide range of actions, which includes running apps and
launching Android tools.
2. The navigation bar helps in navigating our project and open files for editing. It gives a
compact view of structure visible in the Project window.
3. The editor window is a space where we can create and modify our code. On the basis of
the current file type, the editor can change. While viewing a layout file, the editor displays
the Layout Editor.
4. The tool window bar runs around the outside the IDE window and contains buttons that
allow as to expand and collapse individual tool windows.
5. The tool windows provide us access specific tasks like search, project management,
version control, and more. We can able expand and collapse them.
6. The status bar displays the status of our project and IDE itself, as well as any messages or
warnings.

11

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

2.2 ABOUT JAVA

WHAT IS JAVA?

Java is a programming language and computing platform first released by Sun Microsystems in
1995. It has evolved from humble beginnings to power a large share of today’s digital world, by
providing the reliable platform upon which many services and applications are built. New,
innovative products and digital services designed for the future continue to rely on Java, as well.

While most modern Java applications combine the Java runtime and application together, there
are still many applications and even some websites that will not function unless you have a
desktop Java installed. Java.com, this website, is intended for consumers who may still require
Java for their desktop applications – specifically applications targeting Java 8. Developers as well
as users that would like to learn Java programming should visit the dev.java website instead and
business users should visit oracle.com/java for more information.

Java is a popular programming language, created in 1995.

It is owned by Oracle, and more than 3 billion devices run Java.

It is used for:

• Mobile applications (specially Android apps)


• Desktop applications
• Web applications
• Web servers and application servers
• Games
• Database connection

WHY USE JAVA?

• Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
• It is one of the most popular programming language in the world
• It has a large demand in the current job market
• It is easy to learn and simple to use

12

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

• It is open-source and free


• It is secure, fast and powerful
• It has a huge community support (tens of millions of developers)
• Java is an object oriented language which gives a clear structure to programs and allows
code to be reused, lowering development costs
• As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice
versa

2.3 XML

What is XML?

Extensible Markup Language (XML) lets you define and store data in a shareable manner. XML
supports information exchange between computer systems such as websites, databases, and
third-party applications. Predefined rules make it easy to transmit data as XML files over any
network because the recipient can use those rules to read the data accurately and efficiently.

WHY IS XML IMPORTANT?

Extensible Markup Language (XML) is a markup language that provides rules to define any data.
Unlike other programming languages, XML cannot perform computing operations by itself.
Instead, any programming language or software can be implemented for structured data
management.

For example, consider a text document with comments on it. The comments might give
suggestions like these:

• Make the title bold


• This sentence is a header
• This word is the author

Such comments improve the document’s usability without affecting its content. Similarly, XML
uses markup symbols to provide more information about any data. Other software, like
browsers and data processing applications, use this information to process structured data
more efficiently.

• XML stands for eXtensible Markup Language


• XML is a markup language much like HTML
• XML was designed to store and transport data
• XML was designed to be self-descriptive
• XML is a W3C Recommendation

13

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

XML TAGS

You use markup symbols, called tags in XML, to define data. For example, to represent data for
a bookstore, you can create tags such as <book>, <title>, and <author>. Your XML document for
a single book would have content like this:

<book>

<title> Learning Amazon Web Services </title>

<author> Mark Wilkins </author>

</book>

Tags bring sophisticated data coding to integrate information flows across different systems.

BENEFITS OF USING XML

When a company sells a good or service to another company, the two businesses need to
exchange information like cost, specifications, and delivery schedules. With Extensible Markup
Language (XML), they can share all the necessary information electronically and close complex
deals automatically, without any human intervention.

Maintain data integrity

XML lets you transfer data along with the data’s description, preventing the loss of data
integrity. You can use this descriptive information to do the following:

• Verify data accuracy


• Automatically customize data presentation for different users.
• Store data consistently across multiple platforms

Improve search efficiency

Computer programs like search engines can sort and categorize XML files more efficiently and
precisely than other types of documents. For example, the word mark can be either a noun or a
verb. Based on XML tags, search engines can accurately categorize mark for relevant search
results. Thus, XML helps computers to interpret natural language more efficiently.

14

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

Design flexible applications

With XML, you can conveniently upgrade or modify your application design. Many technologies,
especially newer ones, come with built-in XML support. They can automatically read and
process XML data files so that you can make changes without having to reformat your entire
database.

APPLICATIONS OF XML

Extensible Markup Language (XML) is the underlying technology in thousands of applications,


ranging from common productivity tools like word processing to book publishing software and
even complex application configuration systems.

Data transfer

You can use XML to transfer data between two systems that store the same data in different
formats. For example, your website stores dates in MM/DD/YYYY format, but your accounting
system stores dates in DD/MM/YYYY format. You can transfer the data from the website to the
accounting system by using XML. Your developers can write code that automatically converts
the following:

• Website data to XML format


• XML data to accounting system data
• Accounting system data back to XML format
• XML data back to website data

Web applications

XML gives structure to the data that you see on webpages. Other website technologies, like
HTML, work with XML to present consistent and relevant data to website visitors. For example,
consider an e-commerce website that sells clothes. Instead of showing all clothes to all visitors,

15

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

the website uses XML to create customized webpages based on user preferences. It shows
products from specific brands by filtering the <brand> tag.

Documentation

You can use XML to specify the structural information of any technical document. Other
programs then process the document structure to present it flexibly. For example, there are
XML tags for a paragraph, an item in a numbered list, and a heading. Using these tags, other
types of software automatically prepare the document for uses such as printing and webpage
publication.

Data type

Many programming languages support XML as a data type. With this support, you can easily
write programs in other languages that work directly with XML files.

2.4 JSON

What is JSON?
• JSON stands for JavaScript Object Notation
• JSON is a lightweight data-interchange format
• JSON is plain text written in JavaScript object notation
• JSON is used to send data between computers
• JSON is language independent *

JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans
to read and write. It is easy for machines to parse and generate. It is based on a subset of the
JavaScript Programming Language Standard ECMA-262 3rd Edition - December 1999. JSON is a
text format that is completely language independent but uses conventions that are familiar to
programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python,
and many others. These properties make JSON an ideal data-interchange language.

16

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

2.5 API
APIs are mechanisms that enable two software components to communicate with each
other using a set of definitions and protocols. For example, the weather bureau’s software
system contains daily weather data. The weather app on your phone “talks” to this system
via APIs and shows you daily weather updates on your phone.

API stands for Application Programming Interface. In the context of APIs, the word
Application refers to any software with a distinct function. Interface can be thought of as a
contract of service between two applications. This contract defines how the two
communicate with each other using requests and responses. Their API documentation
contains information on how developers are to structure those requests and responses.

How do APIs work?


API architecture is usually explained in terms of client and server. The application sending
the request is called the client, and the application sending the response is called the server.
So in the weather example, the bureau’s weather database is the server, and the mobile app
is the client.

There are four different ways that APIs can work depending on when and why they were
created.

SOAP APIs

These APIs use Simple Object Access Protocol. Client and server exchange messages using
XML. This is a less flexible API that was more popular in the past.

RPC APIs

These APIs are called Remote Procedure Calls. The client completes a function (or
procedure) on the server, and the server sends the output back to the client.

Websocket APIs

Websocket API is another modern web API development that uses JSON objects to pass

17

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

data. A WebSocket API supports two-way communication between client apps and the
server. The server can send callback messages to connected clients, making it more efficient
than REST API.

REST APIs

These are the most popular and flexible APIs found on the web today. The client sends
requests to the server as data. The server uses this client input to start internal functions
and returns output data back to the client. Let’s look at REST APIs in more detail below.

18

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

3. PROJECT WORK

3.1 DEVELOPING A MOBILE ANDROID APPLICATION FOR WEATHER FORECAST


This paper presents the process of developing a mobile android application for the
weather forecast. To create this application, the development environment Android
Studio, as well as the Java programming language, was used. In addition to Java, starting
with Android Studio 3.0.0, the Kotlin programming language is officially supported.
Within this work, Android Studio 3.0.1 and Java programming language was used. When
creating each application, it is necessary to create a new project first. Creating a new
project takes place in a few simple steps. When launching Android Studio, we should
select the "Start a new Android Studio project" option and assign the name for project,
in this case it will be "Weather Forcasting App".

Figure 2. Development enviroment AndroidStudio

3.2 CREATE WEATHER FORECASTING APP IN ANDROID STUDIO

1. Open Android Studio and click on the file option on the upper left corner of the screen.
2. Click on the new option and select the wizard that you want and click on the next
option.
3. Now enter the details that are the name of the project, name of the package, and
android version.
4. Click on the finish option. (You will get two files MainActivity.java and activity_main.xml)
5. In the MainActivity.java write java code and in activity_main.xml file write code to
design front-end of the app.

19

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

Figure 3. Android Studio

Before going to the coading section first we have to do some pre-task.


Go to the app > res > drawable file and paste this image to this file. Now right-click on
the drawable folder > New > Drawable resource File and name the file as btn_bg6.
Below is the code for the btn_bg6.xml file.

Step 1: Get the API key

To get the API key simply sign-in on WeatherBit and subscribe for a free API of Current
Weather Data API. After doing so you will receive an API key and you are good to go.

Step 2: Permission Check

For this app to work we need to ask for three permissions from the system:

• Coarse Location – <uses-permission


android:name=”android.permission.ACCESS_COARSE_LOCATION”/>
• Fine Location – <uses-permission
android:name=”android.permission.ACCESS_FINE_LOCATION”/>
• Internet – <uses-permission android:name=”android.permission.INTERNET”/>

We will add code for use permission in the AndroidManifest.xml file.

20

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

Step 3: Building the Layout

We will add a Button and TextView in the one and only screen of the application. When
the user will click the Button the temperature and city of that location will be shown in
the TextView.

Step 4: Getting Device’s Coordinates

In this step, we will get the last location of the device using Google Play Services –

• Setup google play services by downloading its components in the SDK manager.
• Add dependency in build.gradle for location –
“implementation com.google.android.gms:play-services-location:17.1.0″, the version
might change later.
• In the onCreate() method create an instance of the Fused Location Provider Client.
• After this use lastlocation() method to call the last location. See the Kotlin code
after Step 3.

Step 5: Parse JSON after getting it

To get JSON we need to use Volley Library to make an HTTP client request

• Add ‘implementation com.android.volley:volley:1.1.1’ to the gradle app file.


• Create the http for the JSON. For example –
“https://api.weatherbit.io/v2.0/current?” + “lat=” + location?.latitude
+”&lon=”+ location?.longitude + “&key=”+ api_id1. Here we have already generated API
key as well as the location coordinates.
• Make a request from this URL and get the data.

Step 6: Working with the MainActivity.kt file

Go to the MainActivity.kt file and refer to the following code. Below is the code for the
MainActivity.kt file.

21

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

3.3 CODE
To design the front-end of the application we write code in activity_main.xml and for
providing functionality to our application we write java code in MainActivity.java file.
We can even create more classes in the same package.

Figure 4. Front End

Further, we created the doInBackground method in which we are passing the

String response =
HttpRequest.excuteGet(“https://api.openweathermap.org/data/2.5/weatherq=”+CITY1+”&unit
s=metric&appid=73cbebdd0322acd49bda6ede059b2b18”);

Here 73cbebdd0322acd49bda6ede059b2b18 is the key of the API used.

create your account

https://home.openweathermap.org/users/sign_up

after creating account Log-In here to get the API


https://home.openweathermap.org/users/sign_in

HttpRequest is the name of our class in the same package which we are using to fetch data.

JSONObject is the constructor used to convert external form JSON (Javascript Object Notation)
text into an internal form which we can retrieve with getRequest and can convert values into
JSON text using the toString method.

22

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

The SimpleDateFormat is used to set the format of the data which we want to display on the
TextView to be viewed on front end of our application.

Again we are setting data to the TextViews and setting the visibility of the TextViews used.

3.4 HTTPREQUEST.JAVA

First of all, we created the parameterized method executeGet in which targetUrl is the URL
we passed in our MainActivity class in response variable in which we passed our API key.
Then we opened the link and set our RequestMethod as “GET” as we want to fetch data.
Further, we are writing our code in the try-catch block so as to handle Exceptions. The
finally block is always executed whether an exception occurs or not.

Buffered Reader is class that is used to read text from character input stream buffering
characters so as to read characters efficiently.The method getResponseCode is used to
retrieve the response status from the server.

In finally block we are disconnecting the connection as finally block is always executed
whether Exception occurs or not.

For designing the front end of our application we can use two methods.

1. We can directly drag and drop the required fields.


2. We can write the XML code for the required code.

If we will drag the required field our XML code will be generated automatically.

While designing the front end we just need to specify the layout and id of the field rest all
are generally for the design purpose. In the textColor option “#000000” is the hashcode for
the black color.

Setting the layout is also important as layout determines the view of our front-end.

We can add as many attributes as we want. But in this tutorial, I only added the basic and
required attributes.

To add images as background we need to download the image and save it in the drawable
folder.

23

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

Figure 5. Designing Front End

24

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

4. OUTPUT & SNAPSHOTS

4.1 OUTPUT

• First of all, we will get the EditText with hint Enter City Name.

Figure 6. Output 1

• Then we will enter the name of the city and click the button Search Temp.erature.

• After clicking the button we will get the screen showing the required data.

25

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

Figure 7. OUTPUT 2

26

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

5. CONCLUSION

The development of a modern information society must be based on the application of new ICT
technologies. The use of smart mobile devices in all segments of society requires the
development of new mobile applications. The global software market in this area is growing at
a tremendous pace, so the need for education of IT specialists is very high. This trend of the
development of modern technologies enables the rapid development of the economy in the IT
sector. Of great importance is the advancement of the educational system, which must be
modular and dynamic, so that it can quickly implement new technologies into plans and
programs in all of the levels of education.

27

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)


lOMoARcPSD|34356505

6. REFERANCES

FOR API: after creating account Log-In here to get the API
https://home.openweathermap.org/users/sign_in

https://www.codespeedy.com/weather-forecasting-android-app-using-openweathermap-api-
in-android-studio/

https://www.geeksforgeeks.org/how-to-build-a-weather-app-in-android/

28

Downloaded by Hizbullah Jamily (hizbullahjamily2020@gmail.com)

You might also like