Comments (12)
How to Add Other News Site
from android-news-app.
This app fetches data from the Internet with the Guardian API, so it only displays Guardian news.
from android-news-app.
how can i add the costom newa on this app
from android-news-app.
There's no feature that you can add custom news
from android-news-app.
Can I use it to display news from a respective news web site? The site generates data in JSON format what can be modified from your app to achieve this?
from android-news-app.
I'm sorry, but you cannot use this app to display news from a respective news web site. When I was building this app, I learned how to make an app that connects to the Internet in the Udacity course. The main idea of the code about Networking belongs to Udacity. The UI design is my idea though. The purpose of this repository is to help other Udacians, classmates of Udacity.
from android-news-app.
Can you share me Guardian business URL, as i am getting confuse NewsPreferences.java class.
from android-news-app.
The base URL is "https://content.guardianapis.com/search" and then append query parameters using .appendQueryParameter
.
You don't need to use all that query parameters that I used, but show-tags=contributor
shows author name and show-fields=thumnail
shows the images.
order-by, page-size, order-date, from-date are query parameters for preferences.
You may want to take a look at the requests and responses from the Guardian API:
https://open-platform.theguardian.com/explore/
from android-news-app.
Hi,
Here is the URL: https://newsapi.org/v2/top-headlines?country=in&category=business&apiKey=7ff1a4bf6f8541a8b8036d79a959a426 which i want to build. Well i am unable to append the URL with the same method which you used. please help me to clear this.
from android-news-app.
Hi,
Uri baseUri = Uri.parse("https://newsapi.org/v2/top-headlines");
Uri.Builder uriBuilder = baseUri.buildUpon();
uriBuilder.appendQueryParameter("country", "in")
uriBuilder.appendQueryParameter("category", "business");
uriBuilder.appendQueryParameter("apiKey", "7ff1a4bf6f8541a8b8036d79a959a426");
String url = uriBuilder.toString();
Let me know how it goes.
from android-news-app.
Hi,
Please check as in my case apikey comes at the end of the URL and category='business' comes before the apikey, where i am
unable to return Category (uriBuilder.appendQueryParameter(SECTION_PARAM, section).toString();) in getPreferrelUrl method and call that in Fragment.java NewsPreferences.getPreferredUrl(getcontext(),getString(R.string.bussiness));.
Well i am trying to create separate fragment for each category like
- Business
2.Sports
3.health - Entertainment etc.
Guardian
https://content.guardianapis.com/search?q=&order-by=newest&page-size=10&order-date=published&
from-date=2010-01-01&show-fields=thumbnail,trailText&format=json&show-tags=contributor&api-key=test§ion=business
Newsapi
Please find the url and help me to solve the issue.
from android-news-app.
Hi,
Did you replace SECTION_PARAM with "category"?
Could you please share your code snippet?
from android-news-app.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-news-app.