News Planet connects to the News API to retrieve Breaking News Feed based on the particular endpoint used and then displays them as a list.
Android device running with Android OS 6.0 (API Level 23) or above. Designed for Phones and NOT for Tablets.
- Register for the Developer API Key from the News API Platform. Registration is free of cost.
- Create a new package named myApplication.utils in the Project's root folder.
- Define a property named API_KEY and assign it the value of the API Key obtained from the Registration process.
- If the above API Key is not defined, then the App will use the default "test" API Key which is heavily rate-limited. Whenever the rate-limit is hit, the app may crash or not display proper results.
- The Developer API Key is also rate-limited, but not as limited as the default "test" API Key.
- App queries the
newsapi.org
API to fetch news stories and properly parses the JSON Response. - Each List item displayed by the App for the News stories should contain relevant text and information about the story. This includes -
- Title of the article.
- Source name of the article if present.
- Published date and time of the article if present.
- Default text field remains empty when any of the above parsed information is not available.
- Networking operations are handled by Retrofit library.
- Clicking on a story, redirects and opens the story in user's browser.
- On device rotation
- The layout remains scrollable.
- The app saves state and restores the list back to the previously scrolled position.
- The UI properly adjusts so that all contents of each list item is still visible and not truncated/overlapped.
- When new News data is fetched, the main screen properly updates the new data.
- Check whether connected to internet or not. Also, validate for any occurrence of bad server response or lack of response.
- Used
RecyclerView
in place ofListView
(to display the News stories) for its advantages in performance and easy placeholders for custom item decoration. CardView
for displaying the News stories content for each News List items.- List of libraries used:
- Retrofit : For handling HTTP request and responses.
- Glide : Image Loader library.
- Room : For more robust database access.
- Navigation Component : Navigating between destinations.
- Custom Fonts for
TextViews
usingGoogle Fonts
. - Explored
CoordinatorLayout
. - Used
RecyclerView
in aSwipeRefreshLayout
to use the integrated Progress/Refresh indicator. - Vector graphics editing was done using
Figma
.
Breaking News Page | Search News Page | Bookmarks Page |
---|---|---|
Breaking News Page | Search News Page | Bookmarks Page |
---|---|---|
- Download the app
- Make sure to turn on the Data network before using the app.