Skip to content

Commit

Permalink
Add firebase features
Browse files Browse the repository at this point in the history
cloud messaging, crashlytics, analytics
  • Loading branch information
gouravkhunger committed Mar 11, 2022
1 parent c528100 commit 2693ee6
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,5 @@ lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/

google-services.json
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# QuotesApp

<img alt = "QuotesApp Logo" src="https://raw.githubusercontent.com/GouravKhunger/QuotesApp/main/images/logo.png" height="150px" width="150px" align="right"/>
<img alt = "QuotesApp Logo" src="https://raw.githubusercontent.com/gouravkhunger/QuotesApp/main/images/logo.png" height="150px" width="150px" align="right"/>

A beautiful Quotes App where you can read and save quotes.

This repository contains source code of a Quotes app, which helps you stay motivated by providing best picked quotes
stated by famous personalities. This app uses [zen quotes](https://zenquotes.io) api, for retrieving quotes.

[Download](https://github.com/GouravKhunger/QuotesApp/releases/latest) the latest `apk` file of this project and do provide feedback 😀
[Download](http://quotes.gouravkhunger.xyz) the latest `apk` file of this project and do provide feedback 😀

# Screenshots
Here are some screenshots from the app:

| ![first](https://raw.githubusercontent.com/GouravKhunger/QuotesApp/main/images/one.png) | ![second](https://raw.githubusercontent.com/GouravKhunger/QuotesApp/main/images/two.png) |
| ![first](https://raw.githubusercontent.com/gouravkhunger/QuotesApp/main/images/one.png) | ![second](https://raw.githubusercontent.com/gouravkhunger/QuotesApp/main/images/two.png) |
|---------------------------------|---------------------------------|
| ![third](https://raw.githubusercontent.com/GouravKhunger/QuotesApp/main/images/three.png) | ![fourth](https://raw.githubusercontent.com/GouravKhunger/QuotesApp/main/images/four.png) |
| ![third](https://raw.githubusercontent.com/gouravkhunger/QuotesApp/main/images/three.png) | ![fourth](https://raw.githubusercontent.com/gouravkhunger/QuotesApp/main/images/four.png) |

# Details
[Watch the demo video on Youtube](https://youtu.be/9Kl6WDmTK8g)
Expand All @@ -25,8 +25,11 @@ cooler.

Long pressing a quote in your Bookmarks copies that quote to the clipboard... More features along the way 🚀.

# Development Pre-requisites
Please create a firebase project and add the `google-services.json` file inside the `app/` directory.

# Have awesome ideas?
Feel free to [Create an issue](https://github.com/GouravKhunger/QuotesApp/issues/new)
Feel free to [Create an issue](https://github.com/gouravkhunger/QuotesApp/issues/new)
if you think you have a great idea that could be implmented in the app!

I hope you like the app :)
Expand Down
9 changes: 8 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
id("androidx.navigation.safeargs.kotlin")
id("kotlin-android-extensions")
id("dagger.hilt.android.plugin")
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
}

android {
Expand Down Expand Up @@ -37,7 +39,6 @@ android {
}

dependencies {

implementation("androidx.core:core-ktx:1.7.0")
implementation("androidx.appcompat:appcompat:1.4.1")
implementation("com.google.android.material:material:1.5.0")
Expand Down Expand Up @@ -74,6 +75,12 @@ dependencies {
implementation("androidx.navigation:navigation-fragment-ktx:2.4.1")
implementation("androidx.navigation:navigation-ui-ktx:2.4.1")

// Firebase
implementation(platform("com.google.firebase:firebase-bom:29.1.0"))
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-crashlytics-ktx")
implementation("com.google.firebase:firebase-messaging-ktx")

// App Updater
implementation("com.github.javiersantos:AppUpdater:2.7")

Expand Down
10 changes: 10 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@
android:supportsRtl="true"
android:theme="@style/SplashScreenTheme">

<meta-data
android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="@string/app_name" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@android:color/transparent" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_notification" />

<activity android:name=".ui.QuotesActivity"
android:exported="true">
<intent-filter>
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/ic_notification.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z"/>
</vector>
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ buildscript {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.4.1")
classpath("com.google.dagger:hilt-android-gradle-plugin:$hiltVersion")
classpath("com.google.gms:google-services:4.3.10")
classpath("com.google.firebase:firebase-crashlytics-gradle:2.8.1")

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down

0 comments on commit 2693ee6

Please sign in to comment.