Newesy is news app which uses NewsAPI to fetch news.The main aim of this app was to learn Modern Android Architecture (MVVM). NEWSESY
Features
- App brings you latest news from a wide range of sources
- Clean user interface allows user to navigate different news sections easily.
- User can save news for further reference.
- App allows to search on a topic from over 80000 news sources and blogs.
- It also shows news category wise eg-movies,politics,health etc
Technology Stack Used: Kotlin,Coroutines,MVVM architecture,Room,ViewModel,Live data,Retrofit,Gson,Navigation graph,Glide
πΈ
Screenshots
Package Structure
Newsesy # Root Package
.
βββ adapter # Adapter for Recycler view and pager
| βββ AdapterStragged.kt # Adapter for Stragged layout
| βββ Myadapter.kt # Adapter for Linear layout
β βββ ViewPagerAdapter.kt # Adapter for View pager
β
|
βββ db # Room
β |ββ ArticleDao.kt # Data Access Object for room
| |ββ ArticleDataBase.kt # Database
| |ββ Convertors.kt # Convertors for model class
|
βββ modals # All model classes
| |ββ Articles.kt
| |ββ NewsModal.kt
| |ββ Source.kt
|
|ββ network # All Retrofit classes
| |ββ NetworkApi.kt
| |ββ Retrofitinstance.kt
|
|ββ ui # All fragments used in app
| |ββ explore
| |ββ home
| |ββ info
| |ββ saved
| |ββ search
| |ββ viewpagerfragments
|
βββ util # Utility Classes
β
|ββ viewmodel # Viewmodel and Viewmodel provider classes
| |ββ NewsViewModelProviderFactory.kt
| |ββ ViewModal.kt
|
βββ repository # Repository for both remote and local data
| |ββ Repository.kt
|
|ββ NewsActivity.kt # For showing full news article
βββ MainActivity.kt # MainActivity
βββ SplashScreen.kt # SplashScreen
π
API key You need to provide API key to fetch the news. Currently the news is fetched from NewsAPI
- Generate an API key from NewsAPI
- Add the API key in util->contants file
- Build the app