Skip to content

Commit

Permalink
Version 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chistia007 committed Apr 29, 2023
0 parents commit 0ad0ad8
Show file tree
Hide file tree
Showing 75 changed files with 2,564 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .gitignore
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
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

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.

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

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

19 changes: 19 additions & 0 deletions .idea/gradle.xml

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

25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

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

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

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

1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
52 changes: 52 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}

android {
namespace 'com.example.healthcarecenteradminonly'
compileSdk 33

defaultConfig {
applicationId "com.example.healthcarecenteradminonly"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

buildFeatures{
viewBinding true
}
}

dependencies {

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-firestore:24.4.1'
implementation 'com.google.firebase:firebase-storage:20.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation platform('com.google.firebase:firebase-bom:31.5.0')
implementation 'com.google.firebase:firebase-analytics-ktx'

implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
}
84 changes: 84 additions & 0 deletions app/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"project_info": {
"project_number": "743238945838",
"project_id": "health-care-center-e51e6",
"storage_bucket": "health-care-center-e51e6.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:743238945838:android:c7ee7fa66d17f8fe2f63bf",
"android_client_info": {
"package_name": "com.example.healthcare"
}
},
"oauth_client": [
{
"client_id": "743238945838-nrplhbem7k8ubvdtpka0kvv5ni5q9bsv.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.healthcare",
"certificate_hash": "97f13bab4d1be93e1c92ac36f614437d68bff85a"
}
},
{
"client_id": "743238945838-1nan0khfbp4lbifig3u29n6m5i98jfmd.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDC_SQv6bpiKQf9tM3n4uvL1QQ79XtwDyg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "743238945838-1nan0khfbp4lbifig3u29n6m5i98jfmd.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:743238945838:android:f8ad4fbb7700cf5e2f63bf",
"android_client_info": {
"package_name": "com.example.healthcarecenteradminonly"
}
},
"oauth_client": [
{
"client_id": "743238945838-n3osp4eqteercj09s063i4f3kqqil6ta.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.example.healthcarecenteradminonly",
"certificate_hash": "97f13bab4d1be93e1c92ac36f614437d68bff85a"
}
},
{
"client_id": "743238945838-1nan0khfbp4lbifig3u29n6m5i98jfmd.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDC_SQv6bpiKQf9tM3n4uvL1QQ79XtwDyg"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "743238945838-1nan0khfbp4lbifig3u29n6m5i98jfmd.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
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,26 @@
package com.example.healthcarecenteradminonly;

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.healthcarecenteradminonly", appContext.getPackageName());
}
}
41 changes: 41 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<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.HealthCareCenterAdminOnly"
tools:targetApi="31">
<activity
android:name=".FullScreenImageActivity"
android:exported="false" />
<activity
android:name=".MedicineRequest"
android:exported="false" />
<activity
android:name=".AddNewDoctorActivity"
android:exported="false" />
<activity
android:name=".DoctorDetailsActivity"
android:exported="false" />
<activity
android:name=".FindDcotorActivity"
android:exported="false" />
<activity
android:name=".HomeActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package com.example.healthcarecenteradminonly;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.example.healthcarecenteradminonly.databinding.ActivityAddNewDoctorBinding;
import com.google.firebase.firestore.CollectionReference;
import com.google.firebase.firestore.FirebaseFirestore;

import java.util.HashMap;
import java.util.Map;

public class AddNewDoctorActivity extends AppCompatActivity {
ActivityAddNewDoctorBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding=ActivityAddNewDoctorBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());

binding.btnDocAdd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {

FirebaseFirestore db = FirebaseFirestore.getInstance();
Map<String,String> docotor=new HashMap<>();
docotor.put("doctor_name",binding.DoctorName.getText().toString());
docotor.put("hospital_address",binding.hspAddress.getText().toString());
docotor.put("Experience",binding.exp.getText().toString());
docotor.put("mobile_number",binding.phoneNumber.getText().toString());
docotor.put("fees",binding.fees.getText().toString());
docotor.put("id",binding.docotorId.getText().toString());
docotor.put("limit",binding.limit.getText().toString());
docotor.put("title",binding.dctTitle.getText().toString());
docotor.put("time",binding.apptTime.getText().toString());
docotor.put("taken_appointment",binding.takenAppt.getText().toString());
CollectionReference col = db.collection(binding.dctTitle.getText().toString());

col.document(binding.docotorId.getText().toString()).set(docotor).addOnSuccessListener(aVoid -> {
Toast.makeText(AddNewDoctorActivity.this, "success", Toast.LENGTH_SHORT).show();
startActivity(new Intent(AddNewDoctorActivity.this,DoctorDetailsActivity.class));

});
}
});

}
}
Loading

0 comments on commit 0ad0ad8

Please sign in to comment.