Skip to content

Udacity Android Basics Nanodegree Project#7: News App

Notifications You must be signed in to change notification settings

OyaCanli/NewsReader

Repository files navigation

NewsReader

Udacity Android Basics Nanodegree Project 7 News App:

Here is a video that demonstrates the app in action: https://www.youtube.com/watch?v=e50ZY0AXcxQ

UPDATE (2021)

After 3 years, I finally started to refactor this app which was not building anymore. So much changed in Android in 3 years:
Android support library -> AndroidX
Java -> Kotlin
Raw Http request -> Retrofit
Content provider -> Room
FirebaseJobScheduler, IntentService -> WorkManager
Loader, Asynctask -> Coroutines and Flows View -> Compose Besides many other deprecated libraries, APIs, methods..
Furthermore, I was a beginner when I had created this project. And although I'm still proud to create such a sophisticated app as a beginner, code quality and architecture was miserable, and there was no tests, so I try to give a better shape to this project, as much as time permits. Original project is in the legacy branch (end of update)

The app contains:
  • An animated splash screen. Fetching from internet begins at this activity.
  • MainActivity with a ViewPager where each tab shows the articles of a section. Articles are shown with a recyclerview
  • Each list item has a button for sharing article on social media, and another for adding it to bookmarks. When you click on the rest of the list item it opens DetailsActivity
  • DetailsActivity where user can read the article within the app
  • SettingsActivity where user can chose which sections to display in the MainActivity, in which order the sections should be displayed, or how many articles per page should be shown. User can also choose whether to have regular notifications and regular backups for offline reading.
  • A search wigdet in the toolbar which shows the results in another activity.
  • A bookmarks activity where bookmarked articles are shown. Bookmarked articles can be deleted by swiping left or right. A snackbar makes it possible to undo delete.
Behind the scenes:
  • Fetched articles are cached in the database. These are replaced at each synchronization.
  • Bookmarks are saved permanently, unless user deletes them by swiping. A snackbar makes it possible to undo delete.
  • Database operations are done by the intermediance of a content provider. ListFragments in the main screen and bookmarks activity use cursorloaders for loading data from the content provider
  • Each half-an-hour it looks whether there is a new article in the sections user is interested. If there is, it shows it in a notification. When clicked on the notification, app launches from detailsActivity and shows the article. If user clicks up button, MainActivity is launched. User can disable notifications from the settings.
  • News are backed at each launch. But they are also refreshed regularly in the background according to the choices of user
Credits :

Besides my Udacity Android Basics Nanodegree courses, I also covered Udacity's Developing Android Apps free course before making this app and inspired by the Sunshine app used at that course, for persisting and synchronising app data with the help of background services.

screenshot_2018-05-14-00-27-02

screenshot_2018-05-11-08-02-33

screenshot_2018-05-14-00-27-23

UPDATE:

I hided my api key from the repository, but I put the test key inside the repo. So, normally you can make this work with the test key. Though sometimes test key doesn't work. In that case you can replace the test key in the gradle.properties with your own key, or if you already have your key in your local gradle.properties, just make sure they have the same variable name and it will work with your key.

About

Udacity Android Basics Nanodegree Project#7: News App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published