$30
App Highlights:
• This app displays current news articles from a wide variety of news sources covering a range of news categories.
• NewsAPI.org will be used to acquire the news sources and news articles.
• Selecting a news source will display up to 10 top stories from that news source
• Selecting a news category will limit the news source choices to only those offering that category of news.
• News articles are viewed by swiping right to read the next article, and left to go back to the previous article
• You will not need to develop separate landscape layouts
• The user can go to the complete extended article on the news source’s website by clicking on the article title, text, or image content.
• You must add a professional looking launcher icon to your app.
Application Architecture:
Development (Android Section)
A) News Data:
Acquiring news source and news article data will be done via the NewsAPI.org news aggregation service. This service allows you to download news sources (all or by news type/category) and news articles (by news source)
NOTE: You MUST sign up get an API key in order to access the NewsAPI.org services. Your API KEY must be supplied with NewsAPI.org queries. You can do this by registering at:
https://newsapi.org/register
Register with an email and a new password and agree to the terms and click Submit to register and get your API key (the key is displayed to you right after you click the Submit button).
The API:
The NewsAPI.org service offers 2 API calls – one to get news sources (organizations offering news – CNN, Time, etc.) and one to get top news articles from a selected news source.
1) News Sources Query Format (to be used in our assignment):
To get all sources:
https://newsapi.org/v2/sources?language=en&country=us&category=________&apiKey=________
Note, using an empty string for the category will return source for all categories.
For example, if your category was “business” and your API Key was “ABC123xyz”, the URL would be:
https://newsapi.org/v2/sources?language=en&country=us&category= business &apiKey= ABC123xyz
2) News Article Query Format (to be used in our assignment):
https://newsapi.org/v2/everything?sources=______&language=en&pageSize=100&apiKey=______
For example, if your API Key was “ABC123xyz” and you wanted “cnn” news, the URL would be:
https://newsapi.org/v2/everything?sources=cnn&language=en&pageSize=100&apiKey= ABC123xyz
Development (Android Section)
NewsAPI.org Sources Query Results Example:
https://newsapi.org/v2/sources?language=en&country=us&category=&apiKey= ABC123xyz
The results come in the form of a JSON Object that contains a JSON Array of source entries as shown below. Each entry represents an individual news source. Example:
{
"status": "ok",
"sources": [{
"id": "abc-news",
"name": "ABC News",
"description": "Your trusted source for breaking news, analysis, exclusive interviews, headlines, and videos at ABCNews.com.",
"url": "https://abcnews.go.com",
"category": "general",
"language": "en",
"country": "us"
}, {
"id": "al-jazeera-english",
"name": "Al Jazeera English",
"description": "News, analysis from the Middle East and worldwide, multimedia and interactives, opinions, documentaries, podcasts, long reads and broadcast schedule.",
"url": "http://www.aljazeera.com",
"category": "general",
"language": "en", "country": "us"
}, {
"id": "ars-technica",
"name": "Ars Technica",
"description": "The PC enthusiast's resource. Power users and the tools they love, without computing religion.",
"url": "http://arstechnica.com",
"category": "technology",
"language": "en",
"country": "us"
}, {
. . .
}]
}
Development (Android Section)
NewsAPI.org Articles Query Results Example:
https://newsapi.org/v2/everything?sources=cnn&language=en&pageSize=100&apiKey= ABC123xyz
The results come in the form of a JSON Object that contains a JSON Array of article entries as shown below. Each entry represents an individual news article. Example:
{
"status": "ok",
"totalResults": 4773,
"articles": [{
"source": {
"id": "cnn",
"name": "CNN"
},
"author": "Kristina Marusic, CNN",
"title": " Anatomy of a Pride parade ",
"description": " Pride parades have been with us for decades now. Let's look back at their history and the wide variety of people -- from drag queens to church representatives -- who are in them.",
"url": " https://www.cnn.com/travel/article/pride-parades-history/index.html",
"urlToImage": "https://dynaimage.cdn.cnn.com/cnn/w_1200/http%3A%2F%2Fcdn.cnn.com% 2Fcnnnext%2Fdam%2Fassets%2F190322082046-05-pride-parade-explainerphotos-super-tease.jpg", "publishedAt": " 2019-04-15T14:42:45Z",
"content": "(CNN) Glitter, rainbows, costumes and corporate logos: At first glance, Pride parades may appear to just be one big party. But peek beneath the surface, and you'll discover that Pride is celebrated by a diverse network of groups, each with their own rich hist… [+10486 chars]"
}, {
"source": {
"id": "cnn",
"name": "CNN"
},
"author": null,
"title": " 2020 first-quarter fundraising totals released",
"description": " Today is the last day for campaigns to file Federal Election
Commission disclosure reports with full details of their fundraising. Follow here as we learn the candidates' first-quarter fundraising totals.",
"url": " https://www.cnn.com/politics/live-news/first-quarter-fundraising-totals-04-1519/index.html",
"urlToImage": " https://cdn.cnn.com/cnnnext/dam/assets/190410160852-20190411-2020democrat-power-rankings-april-super-tease.jpg",
"publishedAt": "2019-04-15T13:43:48Z",
"content": " Not only is it Tax Day, but Monday also is the deadline for presidential
and congressional candidates to file reports with the Federal Election Commission, detailing their fundraising and spending during the first three months of the year.\r\nThis marks the fir… [+910 chars] "
}, { . . .
}]
}
Development (Android Section)
B) Application Behavior Diagrams:
1) Overview
Development (Android Section)
3) Swipe Right (or Left) to scroll through articles from the selected new source:
Development (Android Section)
4) Select a news category from the options menu to limit the news source choices to only those offering that category of news.
5) Click on article content to go to extended article on the news source web site
Development (Android Section)
C) Application Content:
Development (Android Section)
2) Up to 25 points of extra credit will be awarded if you display the news categories in the options menu different colors, and then color the news sources in the drawer according to their category:
Options menu example: Drawer list of news sources: example
Assignment Assistance
The TAs for our course is available to assist you with your assignment if needed. Questions on assignment requirements and course concepts can be sent to the instructor.