Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.0.0 #8

Merged
merged 31 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
89d38c8
Initial project setup
aditmodhvadia Nov 15, 2019
9a7f01d
- project structure set up
aditmodhvadia Nov 15, 2019
6ad89bb
- add BaseActivity and BaseFragment
aditmodhvadia Nov 15, 2019
fde1134
- set up FireBase library module
aditmodhvadia Nov 15, 2019
afdcea3
- add apiManager instance to BaseActivity and BaseFragment
aditmodhvadia Nov 15, 2019
42e4792
Merge pull request #1 from aditmodhvadia/project-setup
aditmodhvadia Nov 15, 2019
d7035b0
- add Timber for logging
aditmodhvadia Nov 15, 2019
116a05e
- add test case for SplashActivity
aditmodhvadia Nov 15, 2019
813b43f
- registered and create user with email and password on successfully …
aditmodhvadia Nov 15, 2019
ba30493
- add LandingActivity
aditmodhvadia Nov 16, 2019
b6079c7
- add LoginActivity and complete it's flow
aditmodhvadia Nov 17, 2019
f1ae813
Merge pull request #2 from aditmodhvadia/feature/splash_login_flow
aditmodhvadia Nov 17, 2019
46c41e4
- add Chat room display to LandingActivity
aditmodhvadia Nov 18, 2019
7049564
- add ChatActivity with different views for sent and received messages
aditmodhvadia Nov 18, 2019
b4d7536
- setup dummy data for messages
aditmodhvadia Nov 18, 2019
6d955a6
Merge pull request #3 from aditmodhvadia/feature/chat_setup
aditmodhvadia Nov 18, 2019
105ac24
- add room dependencies
aditmodhvadia Nov 18, 2019
cee36c8
Merge pull request #4 from aditmodhvadia/feature/room_setup_for_messages
aditmodhvadia Nov 18, 2019
a5e7eca
- add NetworkManager to application
aditmodhvadia Nov 23, 2019
6447214
- fix LoginActivity and RegistrationActivity flow
aditmodhvadia Nov 23, 2019
e74a5b5
- add API call for querying backend
aditmodhvadia Nov 23, 2019
a2a1c11
Merge pull request #5 from aditmodhvadia/feature/network_manager
aditmodhvadia Nov 23, 2019
04b8113
- change GET request to POST and send message query with it
aditmodhvadia Nov 24, 2019
f73bce5
- add method to store new sent messages and query response messages t…
aditmodhvadia Nov 29, 2019
bfb80c7
- add IntentService to store messages in FireBase and sync messages f…
aditmodhvadia Nov 30, 2019
1063031
- add static method to Message.java to convert given message into a H…
aditmodhvadia Nov 30, 2019
19fdf86
Merge pull request #6 from aditmodhvadia/feature/firebase_sync_service
aditmodhvadia Nov 30, 2019
8da01c8
Ui/ui updates refinement (#7)
aditmodhvadia Dec 12, 2019
9093643
- update develop branch
aditmodhvadia Mar 10, 2020
9b14d42
- update documentation
aditmodhvadia Mar 10, 2020
525ed62
Update README.md
aditmodhvadia Mar 11, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113 changes: 113 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 67 additions & 2 deletions README.md
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
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
63 changes: 63 additions & 0 deletions app/build.gradle
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')
}
21 changes: 21 additions & 0 deletions app/proguard-rules.pro
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")));
}
}
Loading