sdzshn3 / news24-7-rv Goto Github PK
View Code? Open in Web Editor NEWNews 24/7 is a new app which gets news info from NEWS API and Telugu One.
News 24/7 is a new app which gets news info from NEWS API and Telugu One.
The last article is getting covered under the ad.
So, we need to add bottom margin to the last list item so that it will not be covered under ad.
As of now, app is fetching raw java code to parse data from JSON, we need to use Retrofit to parse data from JSON so that it will be easy to add Paging support to app.
We need to show a loading indicator when the user switches between categories from the navigation drawer menu. The app takes time to fetch the news from the remote server but there's no visual feedback indicating the delay.
To help reduce boilerplate code wrt to findViewById
calls we can use Butterknife.
When the app launches for first time, get the news info and show it to user and also save it to DB.
Or first save news info to DB and after completion, show to user by taking data from DB.
When the user launches app next time (not first time) if internet connection is active, then remove old data and save new data to DB & show to user.
If the internet connection is not active, check if data is available in DB or not. If available, show it to user and let the user know that, the content is old and offline.
Identify the reusable methods/code and move them to a separate helper class. For example, we have methods for setting up the API URL, checking the internet connection, and so on in the fragment classes. We can move all these to a separate class so that they can be reused across all fragment classes.
This has to be re-iterated across ViewModel, Repository and other classes as applicable.
All you need to do is, get the country name using the FusedLocationProviderClient and is already already available in MainActivity. And then convert the country name to code. For example, for India, code is in
. For remaining codes, check in NEWS API website. Then save the country code in Preference manager using the PrefManager class. If the country code is null or empty, don't save it to PrefManager.
And then while generating url, get the country code from PrefManager and append it to url. If the country code is null here too, then just fetch international news.
We are not checking in google-services.json
and gradle.properties
files to VCS to ensure the API keys are not made public. Need to add these to gitignore
so git does not track it when the files are created/updated locally.
Add the instructions on how to build and run this project in Android Studio in README file.
Particularly, the instructions about the google-services.json file which needs to be added to successfully build and run the project.
I have implemented articles to load preference in Settings. If you set it to 10, then 10 articles will be shown. Remove it and implement Android Paging library to support Endless scrolling.
If we scroll down through the articles and then we change the orientation of the screen, then app couldn't retain where it was at. It just scrolls to top again.
Steps to reproduce issue:
Open app > select language > in any of the news category, scroll down through the list > change orientation / rotate your phone.
Now you can see list is scrolled to top automatically which shouldn't happen.
There should be a mediater repository class between Android ViewModel class and retrofit callback.
Here's what you need to do,
Create new repository for each ViewModel class.
Place the retrofit callback inside repository class, also, save the List data into a LiveData variable, add a getter method to get data.
Then in ViewModel class get data from the repository class instead of from retrofit callback.
Add Google News in our app which is available in NEWS API.
This news should be accessed via a button with image as Google News. This button should be placed below the action bar and also below the weather. There should be possibility to add more buttons beside the Google News button. So, buttons should be horizontally aligned and also scrollable.
Use Google Maps API to detect the current city where user is and load the weather info.
Also, add a preference in settings whether to use GPS for location or use the city name which user entered.
When i pull down to refresh in TeluguNewsFragment, app is crashing because, this frgment is extending as NewsFragment which needs to be active for Context.
In reference to issue #12, this is a separate issue to modularize fragment classes. Add a 'BaseFragment' class defining the common functionality for all fragment classes and have the different fragment classes extend the BaseFragment
class.
Telugu news is fetched from an RSS feed. Data is being parsed manually and fed to the adapter. We can use Retrofit to convert the XML data from RSS feed to POJO. Refer to this link for an example.
You can see that each each news category has one separate ViewModel class and repository class.
If you think we can club all the ViewModel classes in a single ViewModel class and similarly, all repositories in a single repository class, then club them.
What do you say guys?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.