-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
* Initial project setup * - project structure set up * - add BaseActivity and BaseFragment * - set up FireBase library module * - add apiManager instance to BaseActivity and BaseFragment - add Crashlytics to app * - add Timber for logging - add version tag display to SplashActivity - add flow for Login/Landing redirection - add Application class with Timber * - add test case for SplashActivity - add RegistrationActivity * - registered and create user with email and password on successfully entering details - add test cases for AppUtils and RegistrationActivity * - add LandingActivity * - add LoginActivity and complete it's flow - add tests for Login and Registration flow * - add Chat room display to LandingActivity * - add ChatActivity with different views for sent and received messages * - setup dummy data for messages - add method to add message to RecyclerView and scroll to it - pass ChatRoom to ChatActivity from LandingActivity * - add room dependencies - add boilerplate code for room - add messages to room and retrieve from it as well - add ability to delete chat room messages from options * - add NetworkManager to application - add QueryResponseMessage POJO - successfully call API from application * - fix LoginActivity and RegistrationActivity flow * - add API call for querying backend - integrate api call flow and display of query response to user - add static id and Names for ChatRoom * - change GET request to POST and send message query with it * - add method to store new sent messages and query response messages to FireStore * - add IntentService to store messages in FireBase and sync messages from FireBase - on logout all local messages are deleted - on login all messages are synced from FireBase * - add static method to Message.java to convert given message into a HashMap for storing in FireStore - add WorkManager for Syncing local and FireStore messages once daily * Ui/ui updates refinement (#7) * - add new color palette for application * - add logo to all the chat rooms * - add app name to SplashActivity - add fade in and fade out transition to SplashActivity - remove windowPreview from app * - fix margin issues in chat activity * - add first name and last name in registration - display first name of user instead of email address in LandingActivity * - add standard button style - * - upgrade gradle build tools version * - add material chips to show query message hints * - final commit * - update develop branch * - update documentation * Update README.md
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,67 @@ | ||
# MET-CS622-ChatBot-Project | ||
An Android chat bot for MET CS622 final Project | ||
# MET-CS622-ChatBot-Project (Chat Bot) | ||
An Android chat bot for MET CS622 final Project which queries smartwatch database to give user insights on their activity. | ||
|
||
## Getting Started | ||
|
||
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. | ||
|
||
### Prerequisites | ||
|
||
* Please fork the repository and work from it so that I can incoorporate the changes you make or if you add any new features. | ||
* You need to have the googleservices.json file to link to firebase, you can set it up using [Set up Firebase](https://firebase.google.com/docs/android/setup) or email me on ([email protected]) for further instructions. | ||
* You need to clone the backend for this project as well which you can find here [MET-CS622-ChatBot-Backend](https://github.com/aditmodhvadia/MET-CS622-ChatBot-Project-Backend). Instructions on how to clone it are given below. | ||
|
||
### Installing | ||
|
||
* Fork and clone both the front end Android repo and the back end Java server. | ||
* [MET-CS622-ChatBot-Android-App](https://github.com/aditmodhvadia/MET-CS622-ChatBot-Project.git) | ||
* [MET-CS622-ChatBot-Backend](https://github.com/aditmodhvadia/MET-CS622-ChatBot-Project-Backend) | ||
* Simply run the following command from your terminal to get the source code on your system in the desired directory. | ||
|
||
``` | ||
git clone https://github.com/<your_username>/MET-CS622-ChatBot-Project.git | ||
``` | ||
``` | ||
git clone https://github.com/<your_username>/MET-CS622-ChatBot-Project-Backend.git | ||
``` | ||
|
||
* Or you can fork this repository and then create a pull request for implementing the changes | ||
|
||
* If you want to install the release apk on your android device then go to the release tab of the repo, and download the apk from the latest release. | ||
|
||
## Deployment | ||
|
||
* All releases would be ready to be isntalled on supported android devices | ||
* This app is for education/research purpose only and hence won't be released on the playstore as of yet, prior announcement will be made. | ||
|
||
## Features | ||
* Run queries to database via chat messages. | ||
* Messages are stored both locally and on cloud. | ||
* User authentication allows any user to log in and retrieve previously typed messages and responses. | ||
* Built with MVVM hence easy to maintain, test and easy to pickup. | ||
|
||
## Built With | ||
|
||
* [Firebase](https://firebase.google.com/) - A comprehensive mobile development platform, go serverless with firebase | ||
* [Maven](https://maven.apache.org/) - Dependency Management | ||
* [Git](https://git-scm.com/downloads) - Used for version control | ||
* [FastAndroidNetworking](https://github.com/amitshekhariitbhu/Fast-Android-Networking) - Used FAN API to call REST APIs | ||
* [Timber](https://github.com/JakeWharton/timber) - Used for logging | ||
|
||
## Contributing | ||
|
||
Will update the requirements and code of conduct soon. | ||
|
||
## Versioning | ||
|
||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/aditmodhvadia/MET-CS622-ChatBot-Project/tags). | ||
|
||
## Authors | ||
|
||
* **Adit Modhvadia** - *Initial work* - [aditmodhvadia](https://github.com/aditmodhvadia/) | ||
|
||
See also the list of [contributors](https://github.com/aditmodhvadia/MET-CS622-ChatBot-Project/contributors) who participated in this project. | ||
|
||
## License | ||
|
||
This project is licensed under the GPL License - see the [LICENSE](https://github.com/aditmodhvadia/Canteen_App/blob/master/LICENSE) file for details |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
apply plugin: 'com.android.application' | ||
apply plugin: 'com.google.gms.google-services' | ||
apply plugin: 'io.fabric' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.2" | ||
defaultConfig { | ||
applicationId "com.fazemeright.chatbotmetcs622" | ||
minSdkVersion 22 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(dir: 'libs', include: ['*.jar']) | ||
implementation 'androidx.appcompat:appcompat:1.1.0' | ||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3' | ||
implementation 'com.google.android.material:material:1.0.0' | ||
implementation 'com.jakewharton.timber:timber:4.7.1' // logging library | ||
|
||
// testing libraries | ||
testImplementation 'junit:junit:4.12' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | ||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
androidTestImplementation 'androidx.test:core:1.2.0' | ||
androidTestImplementation 'androidx.test:runner:1.2.0' | ||
androidTestImplementation 'androidx.test:rules:1.2.0' | ||
androidTestImplementation 'androidx.test.ext:junit:1.1.1' | ||
// Testing-only dependencies | ||
/* testImplementation 'androidx.test:core:1.2.0' | ||
testImplementation 'androidx.test.ext:junit:1.1.1' | ||
testImplementation 'androidx.test.espresso:espresso-core:3.2.0' | ||
testImplementation 'androidx.test.espresso:espresso-intents:3.2.0'*/ | ||
|
||
// Room and Lifecycle dependencies | ||
implementation "androidx.room:room-runtime:2.2.1" | ||
annotationProcessor "androidx.room:room-compiler:2.2.1" | ||
implementation "androidx.lifecycle:lifecycle-extensions:2.1.0" | ||
|
||
// WorkManager Library | ||
implementation ("androidx.work:work-runtime:2.2.0") { | ||
exclude group: 'com.google.guava', module: 'listenablefuture' | ||
} | ||
implementation 'com.google.guava:guava:27.0.1-android' | ||
|
||
|
||
// Networking libraries | ||
implementation 'com.google.code.gson:gson:2.8.6' | ||
implementation 'com.amitshekhar.android:android-networking:1.0.2' | ||
|
||
|
||
implementation project(':firebase-api-library') | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Add project specific ProGuard rules here. | ||
# You can control the set of applied configuration files using the | ||
# proguardFiles setting in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.fazemeright.chatbotmetcs622; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
import androidx.test.platform.app.InstrumentationRegistry; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a> | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class ExampleInstrumentedTest { | ||
@Test | ||
public void useAppContext() { | ||
// Context of the app under test. | ||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); | ||
|
||
assertEquals("com.fazemeright.chatbotmetcs622", appContext.getPackageName()); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.fazemeright.chatbotmetcs622.ui.login; | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
import androidx.test.rule.ActivityTestRule; | ||
|
||
import com.fazemeright.chatbotmetcs622.R; | ||
import com.fazemeright.chatbotmetcs622.ui.registration.RegistrationActivityTest; | ||
|
||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static androidx.test.espresso.Espresso.onView; | ||
import static androidx.test.espresso.action.ViewActions.click; | ||
import static androidx.test.espresso.action.ViewActions.closeSoftKeyboard; | ||
import static androidx.test.espresso.action.ViewActions.typeText; | ||
import static androidx.test.espresso.assertion.ViewAssertions.matches; | ||
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; | ||
import static androidx.test.espresso.matcher.ViewMatchers.withId; | ||
import static org.hamcrest.core.IsNot.not; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class LoginActivityTest { | ||
|
||
@Rule | ||
public ActivityTestRule<LoginActivity> mActivityRule = new ActivityTestRule<>(LoginActivity.class); | ||
|
||
@Test | ||
public void login_with_email_password_isCorrect() { | ||
// onView(withId(R.id.tvHaveAccount)).check(matches(isDisplayed())); | ||
// onView(withId(R.id.tvHaveAccount)).perform(click()); | ||
onView(withId(R.id.btnLogin)).check(matches(isDisplayed())); | ||
onView(withId(R.id.userLoginEmailEditText)).perform(typeText(RegistrationActivityTest.CORRECT_EMAIL_ADDRESS)); | ||
onView(withId(R.id.userPasswordEditText)).perform(typeText(RegistrationActivityTest.CORRECT_PASSWORD), closeSoftKeyboard()); | ||
onView(withId(R.id.btnLogin)).perform(click()); | ||
// TODO: Add IdlingResources to successfully run these tests | ||
onView(withId(R.id.btnLogin)).check(matches(not(isDisplayed()))); | ||
// openActionBarOverflowOrOptionsMenu(ApplicationProvider.getApplicationContext()); | ||
// onView(withId(R.id.action_logout)).check(matches(withText("Logout"))); | ||
} | ||
} |