This report discusses the design and rationale behind the Android News App. It covers the packages, activities, fragments, adapters, and libraries used to create the app. The report also explains the app's features, such as the bottom navigation menu and the ability to access news offline.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
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
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
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
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 viaHypertext 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
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 viewbased on the results of the NewsList. It also triggers an intent on news_layoutclick 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
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
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 acard-view-like design, that is it appears elevated. 4.Glide -Itdecode images Uniform Resource Locator (URL) and loads the image to an imageview. 5.Circleimageview –It helps present them news image in acircle-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