Exeter University ECM2425: Android News App Development and Report

Verified

Added on  2023/04/22

|5
|994
|432
Report
AI Summary
This report details the development of an Android news application designed for mobile devices. The app fetches and displays news stories from various categories using the News API. It is built using Android Studio and incorporates several key components, including activities (Splashscreen and MainActivity), fragments (Main, All, Business, Science, Entertainment, and Sports), adapters (NewsAdapter), and utility classes (Commons, MySingleton, and SharedPreference). The app features offline access by saving news data locally using Shared Preferences and uses libraries such as Volley, RecyclerView, CardView, Glide, and CircleImageView. The report covers the app's design, functionality, and implementation details, including how it handles internet connectivity and user interactions, developed for the ECM2425 Mobile and Ubiquitous Computing module at the University of Exeter.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
COLLEGE OF ENGINEERING, MATHEMATICS AND
PHYSICAL SCIENCE
ANDROID NEWS APP REPORT
NAME:
REG NO:
PROGRAMME:
YEAR:
SEMESTER:
MODULE CODE: ECM 2425
MODULE NAME: MOBILE AND UBIQUITOUS
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Android News App Report
INTRODUCTION
The Android News App allows users to know what is happening around their world by getting them
updated on global news.
DESIGN AND RATIONALE
The App was developed using Android Studio Integrated Development Environment (IDE). It is
composed of:
A. Packages
The app has four user defined packages knows as Utils, Models, MainActivities and MainFragments. All
of them store related java classes thus allowing creation and use of organized java classes.
B. Activities
The app has two activities which has a number of functions that performs a specific task when
executed. The activities include:
i. Splashscreen activity
It is the launcher activity, it appears every time your launch/start the application. It has an animation
that rotates for 3 seconds before the app takes you to the MainActivity. The animation is made up of
the app launcher icon loaded in the XML file using circled image view library.
ii. MainActivity
It is a very basic activity which loads the default fragment(main_fragment) and holds the bottom
navigation menu. When the user selects any of the menu, the activity will call the corresponding
1
Document Page
Android News App Report
fragment of the selected menu by replacing the main_fragment. The bottom navigation menu allows
the user to filter different news categories such as sport, entertainment, science and business.
Also, the MainActivity checks if the app has internet access and it will pop up an alert dialog prompting
the user whether to continue offline or not if there is no internet access. If the user selects the negative
button the app exits else the user is allowed the access the earlier downloaded news content offline.
C. Fragments
The App has six fragments:
i. Main fragment - It acts as the container of all other fragments. In that, it is usually replaced
by other fragments during transactions.
ii. All fragment - It replaces the main fragment on app create state/OnCreate. It pulls the API
data via Hypertext Transfer Protocol (HTTP) request just like the other fragments (except
Main Fragment) but it is unique in that it is the only fragment that saves the Application
Program Interface (API) data locally to the Shared Preference via the SharedPreference java
class.
iii. Business Fragment - It is similar to the All fragment in that it pulls the API data and saves
business related news to the News List java class.
iv. Science Fragment - It pulls the API data and saves sciences related news to the News List
class.
2
Document Page
Android News App Report
v. Entertainment Fragment - It pulls the API data and saves entertainment related news to
the News List class.
vi. Sports Fragment - It also pulls the API data and saves sports related news to the News List
class.
All the five fragments except the main fragment holds a recycler view that display the news image and
title in a custom layout known as news_layout made of a cardview, linear layout and a text view. When
the user clicks any of the populated news_layout, the user is directed to a web browser of the news
link. These fragments also define the number of columns in the recycler view or rather the grid view of
the recycler view. All of these fragments are used within the main activity.
D. Adapters
It holds the NewsAdapter. The NewsAdapter gets the news image, title and url from the NewsList java
class and populates the recycler view based on the results of the NewsList. It also triggers an intent on
news_layout click that directs the user to a browser.
E. Utils
It is a package that contains utilities that each perform a single task:
i. Commons – It contains the common Application Program Interface (API) variables: the API
route, key and country. It returns these values through getters.
ii. MySingleton – It holds shared values of the Volley library i.e. the request queue, context and
instance. It allows the app to track what information was retrieved via the volley library.
3
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Android News App Report
iii. SharedPrefence – It saves the news data locally and updates it as well by removing the
previously saved data and adding the freshly fetched news information. Thus, allowing the
offline news access.
F. App Icon
The app launcher icon was created using Photoshop. It contains a white colored image from google
material design.
G. Libraries
The app integrates a couple of android libraries:
1. Volley – It is a Hypertext Transfer Protocol (HTTP) library that makes networking for Android apps
easier and faster.
2. Recyclerview – It a library that helps reuse component materials such as an image view, text view,
layout.
3. Cardview - It helps present data in a card-view-like design, that is it appears elevated.
4. Glide - It decode images Uniform Resource Locator (URL) and loads the image to an imageview.
5. Circleimageview – It helps present them news image in a circle-like view. It also allows to add a
circle border of desired width to the image.
CONCLUSION
The application supports at least Software Development Kit (SDK) level 14 which targets 100% of
Android users and it uses INTERNET and ACCESS_NETWORK_STATE permissions.
4
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]