Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Raj-m01 authored Sep 30, 2022
1 parent ec8932f commit 5c535e1
Showing 1 changed file with 36 additions and 34 deletions.
70 changes: 36 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# News-App 📰

### Overview :
Android news app built using Kotlin and implemented **MVVM** architecture. It requests news from <a href="https://newsapi.org/">News api</a> with help of **Retrofit** library.
Kotlin-based Android news app helps users stay up-to-date on the latest headlines.

### Features :
* Display News in various categories
* Dark mode
* Share news with friends
* Browse news
* Bookmark news to read later/ Delete news
Expand All @@ -14,53 +15,54 @@ Android news app built using Kotlin and implemented **MVVM** architecture. It re

<table align="center">
<tr>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/mainactivity.jpeg" alt="News home" width=250px height=500px></td>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/read%20news%20activity.jpeg" alt="Saved News" style="width:250px;height:500px;"></td>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/saved%20news%20activity.jpeg" alt="Image - news sharing" style="width:250px;height:500px;"></td>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/mainactivity.jpeg" alt="News home" style="width:200px;height:400px;"></td>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/read%20news%20activity.jpeg" alt="Read News" style="width:200px;height:400px;"></td>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/saved%20news%20activity.jpeg" alt="saved" style="width:200px;height:400px;"></td>
</tr>

<tr>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/home.jpeg" alt="News home" style="width:200px;height:400px;"></td>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/browse.jpeg" alt="read News" style="width:200px;height:400px;"></td>
<td><img src="https://github.com/Raj-m01/News-App/blob/master/screenshots/saved.jpeg" alt="saved news" style="width:200px;height:400px;"></td>
</tr>

</table><br><br>

### Getting Started :
### Tools and Tech stack used :

* Kotlin
* XML
* MVVM Architecture
* Room database library
* Android Studio
* Third party libraries like [retrofit](https://square.github.io/retrofit/), [picasso](https://square.github.io/picasso/), [shimmer](https://github.com/facebook/shimmer-android).

### Getting Started :
Note: To run the app you have to add NewsAPI.org key. This API has limited access to daily request for News.
* Generate API key from <a href="https://newsapi.org/">News api</a>
* Paste the key in gradle.properties
````API_KEY="<YOUR_API_KEY>" ````
* Paste the key in 'gradle.properties' *(Create the file if not exists)*
- For Linux/Mac: `/home/.gradle/gradle.properties`
- For Windows: `C:\Users\<UserName>\.gradle\gradle.properties`

API_KEY="<YOUR_API_KEY>"
* Rebuild app


### Application link : <a href="https://github.com/Raj-m01/News-App/blob/master/apk/News.apk">**Click here to download apk**</a>

### MVVM Architecture :

MVVM is one of the architectural patterns which enhances separation of concerns, it allows separating the user interface logic from the business (or the back-end) logic. Its target (with other MVC patterns goal) is to achieve the following principle "Keeping UI code simple and free of app logic in order to make it easier to manage".

<table align="center" cellpadding="0" cellspacing="0" border="0" width="100%">
<tr><td >
<img style="width:600px;height:400px;" src="https://miro.medium.com/max/875/1*itYWsxQTfq7xTuvIMrVhYg.png" alt="MVVM architecture">
</td></tr>
</table>


#### MVVM components :

* **Entity:** Annotated class that describes a database table when working with Room.

* **SQLite database:** On device storage. The Room persistence library creates and maintains this database for you.

* **DAO:** Data access object. A mapping of SQL queries to functions. When you use a DAO, you call the methods, and Room takes care of the rest.
### Contributing

* **Room database:** Simplifies database work and serves as an access point to the underlying SQLite database (hides SQLiteOpenHelper). The Room database uses the DAO to issue queries to the SQLite database.
- Contributions are always welcome!

* **Repository:** Used to manage multiple data sources.
- See [CONTRIBUTING.md](https://github.com/Raj-m01/News-App/blob/master/CONTRIBUTING.md) for ways to get started.

* **ViewModel:** Acts as a communication center between the Repository (data) and the UI. The UI no longer needs to worry about the origin of the data. ViewModel instances survive Activity/Fragment recreation.

### For hackoberfest:

* **LiveData:** A data holder class that can be observed. Always holds/caches the latest version of data, and notifies its observers when data has changed.


### Retrofit :
<a href="https://square.github.io/retrofit/"><b>Retrofit</b></a> is a type-safe REST client for Android, Java and Kotlin developed by Square. The library provides a powerful framework for authenticating and interacting with APIs and sending network requests with OkHttp.
- **Before creating any Pull Request, please register yourself at [Hacktoberfest's Official Website](https://hacktoberfest.digitalocean.com/)**
- **If a maintainer reports behavior that’s not in line with the project’s code of conduct, then you will be ineligible to participate.**
- **If a maintainer reports your pull request as spam, it will not be counted towards your participation in Hacktoberfest.**

### Application link : <a href="https://github.com/Raj-m01/News-App/blob/master/apk/News.apk">**Click here to download apk**</a>

### 📝 License

Expand Down

0 comments on commit 5c535e1

Please sign in to comment.