-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/caches | ||
/.idea/libraries | ||
/.idea/modules.xml | ||
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
## Income Tax Chatbot App | ||
|
||
This is an Android application developed using Android Studio and Firebase Authentication for a simple Income Tax Chatbot. Users can sign up, sign in, reset passwords, and communicate with the chatbot to get information about income tax-related queries. | ||
|
||
### Features: | ||
- User Authentication (Sign Up, Sign In, Reset Password) using Firebase Authentication. | ||
- Chat interface with a chatbot powered by OpenAI's GPT-3.5. | ||
- Messages sent by the user and responses from the chatbot are displayed in a RecyclerView. | ||
- Firebase Firestore is used to store user information. | ||
|
||
### How to Use: | ||
1. Clone the repository to your local machine. | ||
2. Open the project in Android Studio. | ||
3. Replace the Firebase configuration file (`google-services.json`) with your own obtained from the Firebase Console. | ||
4. Replace the OpenAI API key in the `MainActivity.java` file (`CallAPI()` method) with your own API key. | ||
5. Build and run the application on an Android device or emulator. | ||
|
||
### OpenAI API Key: | ||
You need to obtain an API key from OpenAI to use the chatbot feature. Visit the [OpenAI website](https://openai.com) to sign up and get your API key. | ||
|
||
### Firebase Account: | ||
You need to set up a project on Firebase and enable Firebase Authentication and Firestore. Refer to the [Firebase documentation](https://firebase.google.com/docs) for detailed instructions on setting up Firebase services. | ||
|
||
### Note: | ||
- This application is provided as a sample and may require further customization according to your requirements. | ||
- Make sure to handle sensitive information such as API keys securely, especially when sharing the code publicly. | ||
|
||
### Contributors: | ||
- Priyanshu Gupta | ||
|
||
### License: | ||
- MIT License | ||
|
||
Feel free to contribute, report issues, or suggest improvements! |
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,50 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("com.google.gms.google-services") | ||
} | ||
|
||
android { | ||
namespace = "com.example.income_tax_chatbot" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "com.example.income_tax_chatbot" | ||
minSdk = 24 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
} | ||
|
||
|
||
|
||
dependencies { | ||
|
||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("com.google.android.material:material:1.10.0") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") | ||
implementation("com.google.firebase:firebase-auth:22.2.0") | ||
implementation("com.google.firebase:firebase-firestore") | ||
implementation(platform("com.google.firebase:firebase-bom:32.4.0")) | ||
implementation("com.google.firebase:firebase-analytics") | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
implementation("com.squareup.okhttp3:okhttp:4.10.0") | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"project_info": { | ||
"project_number": "870349213065", | ||
"project_id": "chatbot-c0cb1", | ||
"storage_bucket": "chatbot-c0cb1.appspot.com" | ||
}, | ||
"client": [ | ||
{ | ||
"client_info": { | ||
"mobilesdk_app_id": "1:870349213065:android:79c63670003c77024e2558", | ||
"android_client_info": { | ||
"package_name": "com.example.income_tax_chatbot" | ||
} | ||
}, | ||
"oauth_client": [], | ||
"api_key": [ | ||
{ | ||
"current_key": "AIzaSyCzdYQnSevHPQU-1w1YR0FQ4ebhOmH2XCM" | ||
} | ||
], | ||
"services": { | ||
"appinvite_service": { | ||
"other_platform_oauth_client": [] | ||
} | ||
} | ||
} | ||
], | ||
"configuration_version": "1" | ||
} |
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,26 @@ | ||
package com.example.income_tax_chatbot; | ||
|
||
import android.content.Context; | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
/** | ||
* 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.example.income_tax_chatbot", appContext.getPackageName()); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools"> | ||
|
||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> | ||
<uses-permission android:name="android.permission.INTERNET"/> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:dataExtractionRules="@xml/data_extraction_rules" | ||
android:fullBackupContent="@xml/backup_rules" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:roundIcon="@mipmap/ic_launcher_round" | ||
android:supportsRtl="true" | ||
android:theme="@style/Theme.ChatGPT" | ||
tools:targetApi="31"> | ||
<activity | ||
android:name=".ForgotPasswordActivity" | ||
android:theme="@style/Theme.ChatGPTTheme" | ||
android:exported="false" /> | ||
<activity | ||
android:name=".SignUpActivity" | ||
android:theme="@style/Theme.ChatGPTTheme" | ||
android:exported="false" /> | ||
<activity | ||
android:name=".LoginActivity" | ||
android:theme="@style/Theme.ChatGPTTheme" | ||
android:exported="false" /> | ||
<activity | ||
android:name=".LoginOrSignUpActivity" | ||
android:exported="false" /> | ||
<activity android:name=".MainActivity" /> | ||
<activity | ||
android:name=".SplashScreen" | ||
android:exported="true" | ||
android:theme="@style/SplashScreen"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |