Commit 8c27f598 authored by Thejan Ganepola's avatar Thejan Ganepola

frontend1

parent 95585db5
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
</code_scheme>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/heal (1).iml" filepath="$PROJECT_DIR$/.idea/heal (1).iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="dbbebeeb-c190-4229-bb97-ac92d6fc8080" name="Default Changelist" comment="" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ProjectId" id="2HVYqQEt2sGQwxyeMO24sjChSO6" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="android.sdk.path" value="$USER_HOME$/AppData/Local/Android/Sdk" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../Heal_Pharmacy" />
<property name="settings.editor.selected.configurable" value="AndroidSdkUpdater" />
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="dbbebeeb-c190-4229-bb97-ac92d6fc8080" name="Default Changelist" comment="" />
<created>1668371907327</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1668371907327</updated>
</task>
<servers />
</component>
<component name="WindowStateProjectService">
<state x="481" y="159" key="FileChooserDialogImpl" timestamp="1668372091544">
<screen x="0" y="0" width="1536" height="816" />
</state>
<state x="481" y="159" key="FileChooserDialogImpl/0.0.1536.816@0.0.1536.816" timestamp="1668372091544" />
</component>
</project>
\ No newline at end of file
*.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
/build
\ No newline at end of file
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
namespace 'com.kaviz.heal'
compileSdk 32
buildFeatures {
viewBinding true;
}
defaultConfig {
applicationId "com.kaviz.heal"
minSdk 21
targetSdk 32
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
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-database:20.1.0'
implementation 'com.google.firebase:firebase-auth:21.1.0'
implementation 'com.google.firebase:firebase-storage:20.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
// From here, my implementations
implementation 'com.mikhaellopez:circularimageview:4.3.1'
implementation 'com.github.bumptech.glide:glide:4.14.2'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'com.google.android.gms:play-services-vision:20.1.3'
}
\ No newline at end of file
{
"project_info": {
"project_number": "987611176745",
"project_id": "heal-9eca0",
"storage_bucket": "heal-9eca0.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:987611176745:android:b2c4f436d19b30eff5e138",
"android_client_info": {
"package_name": "com.kaviz.heal"
}
},
"oauth_client": [
{
"client_id": "987611176745-aoc4qj44hiohvvhksub8e81a4a9i21ei.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDpAXVWmMY_38td6WZS6xxtxlmyh0WS5QQ"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "987611176745-aoc4qj44hiohvvhksub8e81a4a9i21ei.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
# 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
-keep class androidx.appcompat.widget.** { *; }
\ No newline at end of file
package com.kaviz.heal;
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.kaviz.heal", appContext.getPackageName());
}
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/app_logo_background"/>
<foreground android:drawable="@mipmap/app_logo_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/app_logo_background"/>
<foreground android:drawable="@mipmap/app_logo_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="app_logo_background">#FFFFFF</color>
</resources>
\ No newline at end of file
<?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.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MICROPHONE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature android:name="android.hardware.audio.low_latency" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-feature android:name="android.hardware.audio.pro" />
<uses-feature android:name="android.hardware.microphone" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/app_logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/app_logo_round"
android:supportsRtl="true"
android:theme="@style/Theme.Heal"
android:usesCleartextTraffic="true"
tools:targetApi="31">
<activity
android:name=".Activities.ChatRobotActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.ShowPharmaciesActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.ChatBotActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.PrescriptionScanActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.HealthTipsActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.GraphsAndPredictionActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.UserDetailsActivity"
android:exported="false"
android:theme="@style/UserDetailsTheme">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.Authentication.RegisterActivity"
android:exported="false">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.HomeActivity"
android:exported="false"
android:theme="@style/HomeTheme">
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name=".Activities.Authentication.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.lib_name"
android:value="" />
</activity>
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat" />
</application>
</manifest>
\ No newline at end of file
package com.kaviz.heal.API;
import com.google.gson.JsonObject;
import com.kaviz.heal.Model.ResponseModelOne;
import com.kaviz.heal.Model.ResponseModelThree;
import com.kaviz.heal.Model.ResponseModelTwo;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
public interface ApiRequestData {
@GET("/risk")
Call<ResponseModelOne>getGraphsAndPrediction();
@GET("/diwo")
Call<ResponseModelTwo>getHealthTips();
@FormUrlEncoded
@POST("/pharmacy")
Call<ResponseModelThree>getPharmacyZ(
@Field("user_location") String user_location,
@Field("medicine_list") String medicine_list
);
@POST("/pharmacy")
Call<ResponseModelThree>getPharmacies(@Body JsonObject jsonObject);
}
package com.kaviz.heal.API;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class RetroServer {
private static final String BASE_URL = "http://ec2-54-242-87-59.compute-1.amazonaws.com:5001";
private static Retrofit retrofit;
public static Retrofit connectRetrofit() {
if (retrofit == null) {
return new Retrofit.Builder().baseUrl(BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
}
return retrofit;
}
}
package com.kaviz.heal.Activities.Authentication;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.TranslateAnimation;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.kaviz.heal.Activities.HomeActivity;
import com.kaviz.heal.Model.User;
import com.kaviz.heal.databinding.ActivityMainBinding;
import java.util.Objects;
public class MainActivity extends AppCompatActivity {
private ActivityMainBinding binding;
//firebase objects
private FirebaseAuth auth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
makeFullScreen();
binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
//initialize objects
auth = FirebaseAuth.getInstance();
//for play animation
setAnimation();
//login button process
binding.loginButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//for login user validation
loginProcess();
}
});
//for navigate registration activity
binding.newUserText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(MainActivity.this, RegisterActivity.class));
}
});
}
//method for login user validation
private void loginProcess() {
String email = binding.emailText.getText().toString();
String password = binding.passwordText.getText().toString();
if (email.isEmpty()) {
binding.emailText.setError("Enter Email");
} else if (password.isEmpty()) {
binding.passwordText.setError("Enter Password");
} else {
binding.progressBar.setVisibility(View.VISIBLE);
binding.loginButton.setEnabled(false);
//for login user
loginUser(new User(email, password));
}
}
//method for login user
private void loginUser(User user) {
auth.signInWithEmailAndPassword(user.getEmail(), user.getPassword())
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
showToast("Successfully Logged In!");
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
} else {
showToast("Error - "+ Objects.requireNonNull(task.getException()).getMessage());
}
binding.progressBar.setVisibility(View.GONE);
binding.loginButton.setEnabled(true);
}
});
}
//for play animation
private void setAnimation() {
binding.loginAreaLayout.animate().alpha(0f).setDuration(1);
TranslateAnimation animation = new TranslateAnimation(0, 0, 0, -1000);
animation.setDuration(1500);
animation.setFillAfter(false);
animation.setAnimationListener(new MyAnimationListener());
binding.textLayout.setAnimation(animation);
}
@Override
protected void onStart() {
super.onStart();
if (FirebaseAuth.getInstance().getCurrentUser() != null) {
startActivity(new Intent(this, HomeActivity.class));
}
}
// For hide the status bar.
private void makeFullScreen() {
//getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Hide the app bar.
if (getSupportActionBar() != null) {
getSupportActionBar().hide();
}
}
//class for animation listener
private class MyAnimationListener implements Animation.AnimationListener {
@Override
public void onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
binding.textLayout.clearAnimation();
binding.textLayout.setVisibility(View.INVISIBLE);
binding.loginAreaLayout.animate().alpha(1f).setDuration(1500);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
}
private void showToast(String message) {
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
}
}
\ No newline at end of file
package com.kaviz.heal.Activities.Authentication;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.AuthResult;
import com.google.firebase.auth.FirebaseAuth;
import com.kaviz.heal.Activities.UserDetailsActivity;
import com.kaviz.heal.Model.User;
import com.kaviz.heal.databinding.ActivityRegisterBinding;
import java.util.Objects;
public class RegisterActivity extends AppCompatActivity {
ActivityRegisterBinding binding;
//firebase objects
private FirebaseAuth auth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityRegisterBinding.inflate(getLayoutInflater());
makeFullScreen();
setContentView(binding.getRoot());
//initialize objects
auth = FirebaseAuth.getInstance();
//for navigate registration activity
binding.alreadyUserText.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(RegisterActivity.this, MainActivity.class));
}
});
//for handle register button
binding.registerButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
registerButtonProcess();
}
});
}
//for handle register button process
private void registerButtonProcess() {
String email = binding.emailText.getText().toString();
String password = binding.passwordText.getText().toString();
if (email.isEmpty()) {
binding.emailText.setError("Enter Email");
} else if (password.isEmpty()) {
binding.passwordText.setError("Enter Password");
} else {
binding.progressBar.setVisibility(View.VISIBLE);
binding.registerButton.setEnabled(false);
//for register user
registerUser(new User(email, password));
}
}
//for register user
private void registerUser(User user) {
auth.createUserWithEmailAndPassword(user.getEmail(), user.getPassword())
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
showToast("Successfully Registered!");
Intent intent = new Intent(RegisterActivity.this, UserDetailsActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
} else {
showToast("Error - "+ Objects.requireNonNull(task.getException()).getMessage());
}
binding.progressBar.setVisibility(View.GONE);
binding.registerButton.setEnabled(true);
}
});
}
// For hide the status bar.
private void makeFullScreen() {
//getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
// Hide the app bar.
if (getSupportActionBar() != null) {
getSupportActionBar().hide();
}
}
private void showToast(String message) {
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.util.Log;
import android.webkit.PermissionRequest;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebViewClient;
import android.widget.Toast;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityChatBotBinding;
public class ChatBotActivity extends AppCompatActivity {
private ActivityChatBotBinding binding;
private static final int MY_PERMISSIONS_REQUEST_RECORD_AUDIO = 101;
private PermissionRequest myRequest;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityChatBotBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(getResources().getString(R.string.live_chat));
}
setWebView();
// try {
//
// binding.chatBotWebView.getSettings().setJavaScriptEnabled(true);
// binding.chatBotWebView.getSettings().setUseWideViewPort(true);
// binding.chatBotWebView.getSettings().setLoadWithOverviewMode(true);
// binding.chatBotWebView.loadUrl("https://kosalaproject.000webhostapp.com/");
//
// } catch (Exception e) {
//
// Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
//
// }
}
private void setWebView() {
binding.chatBotWebView.getSettings().setJavaScriptEnabled(true);
binding.chatBotWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
binding.chatBotWebView.setWebViewClient(new WebViewClient());
binding.chatBotWebView.getSettings().setSaveFormData(true);
binding.chatBotWebView.getSettings().setSupportZoom(false);
binding.chatBotWebView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
binding.chatBotWebView.getSettings().setPluginState(WebSettings.PluginState.ON);
binding.chatBotWebView.setWebChromeClient(new WebChromeClient() {
@Override
public void onPermissionRequest(final PermissionRequest request) {
myRequest = request;
for (String permission : request.getResources()) {
switch (permission) {
case "android.webkit.resource.AUDIO_CAPTURE": {
askForPermission(request.getOrigin().toString(), Manifest.permission.RECORD_AUDIO, MY_PERMISSIONS_REQUEST_RECORD_AUDIO);
break;
}
}
}
}
});
binding.chatBotWebView.loadUrl("https://kosalaproject.000webhostapp.com/");
}
@Override
public void onBackPressed() {
if (binding.chatBotWebView.canGoBack()) {
binding.chatBotWebView.goBack();
} else {
super.onBackPressed();
}
}
@Override
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
switch (requestCode) {
case MY_PERMISSIONS_REQUEST_RECORD_AUDIO: {
Log.d("WebView", "PERMISSION FOR AUDIO");
if (grantResults.length > 0
&& grantResults[0] == PackageManager.PERMISSION_GRANTED) {
// permission was granted, yay! Do the
// contacts-related task you need to do.
myRequest.grant(myRequest.getResources());
binding.chatBotWebView.loadUrl("https://kosalaproject.000webhostapp.com/");
} else {
// permission denied, boo! Disable the
// functionality that depends on this permission.
}
}
// other 'case' lines to check for other
// permissions this app might request
}
}
public void askForPermission(String origin, String permission, int requestCode) {
Log.d("WebView", "inside askForPermission for" + origin + "with" + permission);
if (ContextCompat.checkSelfPermission(getApplicationContext(),
permission)
!= PackageManager.PERMISSION_GRANTED) {
// Should we show an explanation?
if (ActivityCompat.shouldShowRequestPermissionRationale(ChatBotActivity.this,
permission)) {
// Show an expanation to the user *asynchronously* -- don't block
// this thread waiting for the user's response! After the user
// sees the explanation, try again to request the permission.
} else {
// No explanation needed, we can request the permission.
ActivityCompat.requestPermissions(ChatBotActivity.this,
new String[]{permission},
requestCode);
}
} else {
myRequest.grant(myRequest.getResources());
}
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebViewClient;
import android.widget.Toast;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityChatRobotBinding;
public class ChatRobotActivity extends AppCompatActivity {
ActivityChatRobotBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityChatRobotBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(getResources().getString(R.string.robot_solutions));
}
try {
binding.webView.getSettings().setJavaScriptEnabled(true);
binding.webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
binding.webView.setWebViewClient(new WebViewClient());
binding.webView.getSettings().setSaveFormData(true);
binding.webView.getSettings().setSupportZoom(false);
binding.webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
binding.webView.getSettings().setPluginState(WebSettings.PluginState.ON);
binding.webView.loadUrl("https://medibot-api.herokuapp.com/api/v1.0/?csrfmiddlewaretoken=uHTimuDB9kf1ljFD8cAMEEU514jWpWZBE85lzchmsUpE2P3n093p9I0HuTPjZjCL");
} catch (Exception e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.github.mikephil.charting.data.BarData;
import com.github.mikephil.charting.data.BarDataSet;
import com.github.mikephil.charting.data.BarEntry;
import com.github.mikephil.charting.utils.ColorTemplate;
import com.kaviz.heal.API.ApiRequestData;
import com.kaviz.heal.API.RetroServer;
import com.kaviz.heal.Model.ResponseModelOne;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityGraphsAndPredictionBinding;
import java.util.ArrayList;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class GraphsAndPredictionActivity extends AppCompatActivity {
private ActivityGraphsAndPredictionBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityGraphsAndPredictionBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(getResources().getString(R.string.graphs_future_predictions));
}
getGraphsAndPrediction();
}
private void getGraphsAndPrediction() {
binding.progressBar.setVisibility(View.VISIBLE);
ApiRequestData apiRequestData = RetroServer.connectRetrofit().create(ApiRequestData.class);
Call<ResponseModelOne>call = apiRequestData.getGraphsAndPrediction();
call.enqueue(new Callback<ResponseModelOne>() {
@Override
public void onResponse(@NonNull Call<ResponseModelOne> call, @NonNull Response<ResponseModelOne> response) {
if (response.body().getStatus().equals("success")) {
int [] bloodOxygenLevel = response.body().getBloodOxygenLevel();
int [] heartRate = response.body().getHeartRate();
int [] bodyTemperature = response.body().getBodyTemperature();
String riskLevel = response.body().getRiskLevel();
showBarchart(bloodOxygenLevel, heartRate, bodyTemperature, riskLevel);
}
}
@Override
public void onFailure(@NonNull Call<ResponseModelOne> call, @NonNull Throwable t) {
Toast.makeText(GraphsAndPredictionActivity.this, t.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
binding.progressBar.setVisibility(View.GONE);
}
});
}
private void showBarchart(int[] bloodOxygenLevel, int[] heartRate, int[] bodyTemperature, String riskLevel) {
ArrayList<BarEntry>bloodOxygenLevelList = new ArrayList<>();
ArrayList<BarEntry>heartRateList = new ArrayList<>();
ArrayList<BarEntry>bodyTemperatureList = new ArrayList<>();
for (int i = 0; i <= 10; i++) {
bloodOxygenLevelList.add(new BarEntry(i, (float) bloodOxygenLevel[i]));
heartRateList.add(new BarEntry(i, (float) heartRate[i]));
bodyTemperatureList.add(new BarEntry(i, (float) bodyTemperature[i]));
}
BarDataSet bloodOxygenLevelData = new BarDataSet(bloodOxygenLevelList, "Blood Oxygen Level");
BarDataSet heartRateData = new BarDataSet(heartRateList, "Heart Rate");
BarDataSet bodyTemperatureData = new BarDataSet(bodyTemperatureList, "Body Temperature Level");
bloodOxygenLevelData.setColors(ColorTemplate.COLORFUL_COLORS);
heartRateData.setColors(ColorTemplate.COLORFUL_COLORS);
bodyTemperatureData.setColors(ColorTemplate.COLORFUL_COLORS);
bloodOxygenLevelData.setDrawValues(false);
heartRateData.setDrawValues(false);
bodyTemperatureData.setDrawValues(false);
binding.bloodOxygenLevelBarChart.setData(new BarData(bloodOxygenLevelData));
binding.heartRateBarChart.setData(new BarData(heartRateData));
binding.bodyTemperatureBarChart.setData(new BarData(bodyTemperatureData));
binding.bloodOxygenLevelBarChart.animateY(3000);
binding.heartRateBarChart.animateY(3000);
binding.bodyTemperatureBarChart.animateY(3000);
binding.bloodOxygenLevelBarChart.getDescription().setText("Blood Oxygen Level");
binding.heartRateBarChart.getDescription().setText("Heart Rate");
binding.bodyTemperatureBarChart.getDescription().setText("Body Temperature Level");
binding.bloodOxygenLevelBarChart.getDescription().setTextColor(Color.BLUE);
binding.predictionText.setText(riskLevel);
binding.progressBar.setVisibility(View.GONE);
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;
import com.kaviz.heal.API.ApiRequestData;
import com.kaviz.heal.API.RetroServer;
import com.kaviz.heal.Model.ResponseModelTwo;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityHealthTipsBinding;
import java.util.Arrays;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class HealthTipsActivity extends AppCompatActivity {
ActivityHealthTipsBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityHealthTipsBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(getResources().getString(R.string.health_tips));
}
getHealthTips();
}
private void getHealthTips() {
binding.progressBar.setVisibility(View.VISIBLE);
ApiRequestData apiRequestData = RetroServer.connectRetrofit().create(ApiRequestData.class);
Call<ResponseModelTwo>call = apiRequestData.getHealthTips();
call.enqueue(new Callback<ResponseModelTwo>() {
@Override
public void onResponse(@NonNull Call<ResponseModelTwo> call, @NonNull Response<ResponseModelTwo> response) {
if (response.isSuccessful()) {
if (response.body() != null) {
if (response.body().getStatus().equals("success")) {
showHealthTips(response.body().getExercisePlan(), response.body().getDietPlan());
}
}
}
}
@Override
public void onFailure(@NonNull Call<ResponseModelTwo> call, @NonNull Throwable t) {
Toast.makeText(HealthTipsActivity.this, t.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
binding.progressBar.setVisibility(View.GONE);
}
});
}
private void showHealthTips(String exercisePlan, String dietPlan) {
binding.exercisePlanText.setText(exercisePlan);
binding.dietPlanText.setText(dietPlan);
binding.progressBar.setVisibility(View.GONE);
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import com.google.firebase.auth.FirebaseAuth;
import com.kaviz.heal.Activities.Authentication.MainActivity;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityHomeBinding;
public class HomeActivity extends AppCompatActivity {
private ActivityHomeBinding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityHomeBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
setSupportActionBar(binding.toolBar);
binding.prescriptionScanning.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(HomeActivity.this, PrescriptionScanActivity.class));
}
});
binding.graphsAndPrediction.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(HomeActivity.this, GraphsAndPredictionActivity.class));
}
});
binding.healthTips.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(HomeActivity.this, HealthTipsActivity.class));
}
});
binding.chatBotSecond.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
startActivity(new Intent(HomeActivity.this, ChatRobotActivity.class));
}
});
binding.liveChat.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
final ProgressDialog progressDialog = new ProgressDialog(HomeActivity.this);
progressDialog.setMessage("Please Wait...");
progressDialog.setCancelable(false);
progressDialog.show();
startActivity(new Intent(HomeActivity.this, ChatBotActivity.class));
progressDialog.dismiss();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main_menu, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
if (item.getItemId() == R.id.logOutUser) {
System.out.println("Clicked");
if (FirebaseAuth.getInstance().getCurrentUser() != null) {
AlertDialog.Builder builder = new AlertDialog.Builder(HomeActivity.this);
builder.setTitle("Warning");
builder.setMessage("Are you sure you want to log out");
builder.setNegativeButton("YES", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
FirebaseAuth.getInstance().signOut();
Intent intent = new Intent(HomeActivity.this, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
startActivity(intent);
}
});
builder.setPositiveButton("NO", null);
builder.show();
}
}
return super.onOptionsItemSelected(item);
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.provider.MediaStore;
import android.util.SparseArray;
import android.view.View;
import android.widget.Toast;
import com.google.android.gms.vision.Frame;
import com.google.android.gms.vision.text.TextBlock;
import com.google.android.gms.vision.text.TextRecognizer;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.kaviz.heal.API.ApiRequestData;
import com.kaviz.heal.API.RetroServer;
import com.kaviz.heal.Model.Pharmacy;
import com.kaviz.heal.Model.ResponseModelThree;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityPrescriptionScanBinding;
import com.theartofdev.edmodo.cropper.CropImage;
import com.theartofdev.edmodo.cropper.CropImageView;
import org.json.JSONObject;
import java.util.ArrayList;
import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
public class PrescriptionScanActivity extends AppCompatActivity {
private ActivityPrescriptionScanBinding binding;
private static final int REQUEST_CAMERA_CODE = 100;
private Bitmap bitmap;
private static final int REQUEST_CODE = 100;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityPrescriptionScanBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(getResources().getString(R.string.prescription_scan));
}
if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.CAMERA}, REQUEST_CAMERA_CODE);
}
binding.scanButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
binding.dataText.setText("");
CropImage.activity().setGuidelines(CropImageView.Guidelines.ON).start(PrescriptionScanActivity.this);
}
});
binding.sendPrescriptionButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
sendLocationWithData();
}
});
}
private void sendLocationWithData() {
binding.progressBar.setVisibility(View.VISIBLE);
final String location = "6.9154908,79.9726544";
final String medicines = binding.dataText.getText().toString().toLowerCase();
JSONObject jsonObjectMain = new JSONObject();
try {
jsonObjectMain.put("user_location", location);
jsonObjectMain.put("medicine_list", medicines);
} catch (Exception e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
JsonObject jsonObject = (JsonObject) new JsonParser().parse(jsonObjectMain.toString());
System.out.println(jsonObject.toString());
ApiRequestData apiRequestData = RetroServer.connectRetrofit().create(ApiRequestData.class);
Call<ResponseModelThree>getPharmacies = apiRequestData.getPharmacies(jsonObject);
getPharmacies.enqueue(new Callback<ResponseModelThree>() {
@Override
public void onResponse(@NonNull Call<ResponseModelThree> call, @NonNull Response<ResponseModelThree> response) {
if (response.isSuccessful()) {
if (response.body().getStatus().equals("success")) {
ArrayList<Pharmacy> pharmacyList = (ArrayList<Pharmacy>) response.body().getPharmacy_recommendation();
System.out.println(pharmacyList.get(0).getName());
if (!pharmacyList.isEmpty()) {
Intent intent = new Intent(PrescriptionScanActivity.this, ShowPharmaciesActivity.class);
intent.putExtra("PharmacyList", pharmacyList);
intent.putExtra("Medicines", medicines);
startActivity(intent);
} else {
Toast.makeText(PrescriptionScanActivity.this, "No pharmacy could be found!", Toast.LENGTH_SHORT).show();
}
binding.progressBar.setVisibility(View.GONE);
}
}
}
@Override
public void onFailure(@NonNull Call<ResponseModelThree> call, @NonNull Throwable t) {
Toast.makeText(PrescriptionScanActivity.this, t.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
binding.progressBar.setVisibility(View.GONE);
}
});
binding.progressBar.setVisibility(View.GONE);
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
CropImage.ActivityResult result = CropImage.getActivityResult(data);
if (resultCode == RESULT_OK) {
Uri uri = result.getUri();
try {
bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), uri);
getTextFromImage(bitmap);
} catch (Exception e) {
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
}
}
private void getTextFromImage(Bitmap bitmap) {
TextRecognizer recognizer = new TextRecognizer.Builder(this).build();
if (!recognizer.isOperational()) {
Toast.makeText(this, "Something Wrong!", Toast.LENGTH_SHORT).show();
} else {
Frame frame = new Frame.Builder().setBitmap(bitmap).build();
SparseArray<TextBlock> textBlockSparseArray = recognizer.detect(frame);
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < textBlockSparseArray.size(); i++) {
TextBlock textBlock = textBlockSparseArray.valueAt(i);
stringBuilder.append(textBlock.getValue());
//stringBuilder.append("\n");
}
binding.dataText.setText(stringBuilder.toString());
binding.scanButton.setText(R.string.retake);
binding.sendPrescriptionButton.setVisibility(View.VISIBLE);
}
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.AppCompatButton;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import android.app.Dialog;
import android.os.Bundle;
import android.util.ArrayMap;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.kaviz.heal.Adapters.PharmacyAdapter;
import com.kaviz.heal.Interfaces.ClickEvents;
import com.kaviz.heal.Model.Pharmacy;
import com.kaviz.heal.Model.User;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityShowPharmaciesBinding;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
public class ShowPharmaciesActivity extends AppCompatActivity implements ClickEvents {
private ActivityShowPharmaciesBinding binding;
private ArrayList<Pharmacy>pharmacyList;
private Dialog addNumberDialog;
private Pharmacy pharmacy;
private String medicines;
private FirebaseAuth auth;
private FirebaseDatabase database;
String userName;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityShowPharmaciesBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle("Pharmacy List");
}
database = FirebaseDatabase.getInstance();
auth = FirebaseAuth.getInstance();
pharmacyList = (ArrayList<Pharmacy>) getIntent().getSerializableExtra("PharmacyList");
medicines = getIntent().getStringExtra("Medicines");
final PharmacyAdapter adapter = new PharmacyAdapter(this, pharmacyList, this);
binding.pharmacyRecyclerView.setLayoutManager(new LinearLayoutManager(this));
binding.pharmacyRecyclerView.setHasFixedSize(true);
binding.pharmacyRecyclerView.setAdapter(adapter);
initializeAddCategoryDialog();
}
@Override
public void onClick(int position) {
pharmacy = pharmacyList.get(position);
System.out.println(pharmacy.getName());
addNumberDialog.show();
}
private void initializeAddCategoryDialog() {
addNumberDialog = new Dialog(this);
addNumberDialog.setContentView(R.layout.add_number_layout);
addNumberDialog.setCancelable(true);
addNumberDialog.getWindow().setBackgroundDrawable(ContextCompat.getDrawable(this, R.drawable.progress_background));
addNumberDialog.getWindow().setLayout(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
EditText numberNameText = addNumberDialog.findViewById(R.id.numberNameText);
AppCompatButton addNumberButton = addNumberDialog.findViewById(R.id.addNumberButton);
numberNameText.getText().clear();
addNumberButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
binding.progressBar.setVisibility(View.VISIBLE);
String number = numberNameText.getText().toString();
if (number.isEmpty()) {
Toast.makeText(ShowPharmaciesActivity.this, "Enter Mobile Number", Toast.LENGTH_SHORT).show();
binding.progressBar.setVisibility(View.GONE);
} else {
addNumberDialog.cancel();
addDataToPharmacy(pharmacy, number);
}
}
});
}
private void addDataToPharmacy(Pharmacy pharmacy, String number) {
binding.progressBar.setVisibility(View.VISIBLE);
database.getReference().child("UserDetails").child(auth.getCurrentUser().getUid())
.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
User user = snapshot.getValue(User.class);
if (user != null) {
userName = user.getName();
Map<String, Object>dataMap = new ArrayMap<>();
dataMap.put("clientName", user.getName());
dataMap.put("phoneNumber", number);
dataMap.put("medicines", medicines);
database.getReference().child("Orders").push().setValue(dataMap).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
Toast.makeText(ShowPharmaciesActivity.this, "The order has been sent Successfully!", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(ShowPharmaciesActivity.this, "Error - "+task.getException().getMessage(), Toast.LENGTH_SHORT).show();
}
binding.progressBar.setVisibility(View.GONE);
}
});
}
}
@Override
public void onCancelled(@NonNull DatabaseError error) {
Toast.makeText(ShowPharmaciesActivity.this, error.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
}
\ No newline at end of file
package com.kaviz.heal.Activities;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.app.ProgressDialog;
import android.content.ContentResolver;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.webkit.MimeTypeMap;
import android.widget.RadioButton;
import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
import com.kaviz.heal.Activities.Authentication.RegisterActivity;
import com.kaviz.heal.Model.User;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.ActivityUserDetailsBinding;
import java.util.Objects;
public class UserDetailsActivity extends AppCompatActivity {
private static final int IMAGE_REQUEST_CODE = 100;
private ActivityUserDetailsBinding binding;
//firebase objects
private FirebaseAuth auth;
private FirebaseDatabase database;
private Uri imageURI;
private String imageURL = "default";
private String gender = "none";
private ProgressDialog showDialog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityUserDetailsBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());
//initialize objects
auth = FirebaseAuth.getInstance();
database = FirebaseDatabase.getInstance();
//for enable show dialog object
showDialog();
//for add click event change profile (open gallery)
binding.userProfilePicture.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
openImageChooser();
}
});
binding.submitButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
registerButtonProcess();
}
});
}
//handle register button
private void registerButtonProcess() {
String name = binding.nameText.getText().toString();
String height = binding.heightText.getText().toString();
String weight = binding.weightText.getText().toString();
String address = binding.addressText.getText().toString();
int selectedRadioButtonID = binding.genderGroup.getCheckedRadioButtonId();
RadioButton selectedRadioButton = findViewById(selectedRadioButtonID);
if (selectedRadioButton != null) {
gender = selectedRadioButton.getText().toString();
}
if (name.isEmpty()) {
binding.nameText.setError("Enter Name");
} else if (height.isEmpty()){
binding.heightText.setError("Enter Height");
} else if (weight.isEmpty()) {
binding.weightText.setError("Enter Weight");
} else if (address.isEmpty()) {
binding.addressText.setError("Enter Address");
} else if (gender.equals("none")) {
Toast.makeText(this, "Please Select Your Gender", Toast.LENGTH_SHORT).show();
} else {
showDialog.show();
binding.submitButton.setEnabled(false);
User user = new User(name, Double.parseDouble(height), Double.parseDouble(weight), address, gender, imageURL);
registerUser(user);
}
}
//for register user
private void registerUser(User user) {
database.getReference().child("UserDetails").child(auth.getCurrentUser().getUid())
.setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
showToast("Data Successfully Submitted!");
startActivity(new Intent(UserDetailsActivity.this, HomeActivity.class));
finishAffinity();
} else {
showToast("Error - "+task.getException().getMessage());
}
showDialog.dismiss();
binding.submitButton.setEnabled(false);
}
});
}
//method for open image chooser (gallery)
private void openImageChooser() {
Intent intent = new Intent();
intent.setType("image/");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent, IMAGE_REQUEST_CODE);
}
private void showDialog() {
showDialog = new ProgressDialog(this);
showDialog.setMessage("Please Wait");
showDialog.setCancelable(false);
}
//for get image url
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == IMAGE_REQUEST_CODE && resultCode == RESULT_OK) {
if (data != null) {
if (data.getData() != null) {
imageURI = data.getData();
uploadImage();
}
}
}
}
//for upload image to firebase
private void uploadImage() {
final ProgressDialog progressDialog = new ProgressDialog(this);
progressDialog.setTitle("Uploading Image");
progressDialog.setMessage("Please Wait...");
progressDialog.setCancelable(false);
progressDialog.show();
StorageReference fileReference = FirebaseStorage.getInstance().getReference().child("Uploads")
.child(System.currentTimeMillis()+"."+getFileExtension(imageURI));
fileReference.putFile(imageURI).addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {
@Override
public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {
if (task.isSuccessful()) {
fileReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
try {
imageURL = uri.toString();
Glide.with(UserDetailsActivity.this).load(imageURL).placeholder(R.drawable.user_placeholder).into(binding.userProfilePicture);
progressDialog.dismiss();
Toast.makeText(UserDetailsActivity.this, "Successfully Profile Picture Uploaded!", Toast.LENGTH_SHORT).show();
} catch (Exception e) {
Toast.makeText(UserDetailsActivity.this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
} else {
Toast.makeText(UserDetailsActivity.this, Objects.requireNonNull(task.getException()).getMessage(), Toast.LENGTH_SHORT).show();
}
}
});
}
//for get image extension
private String getFileExtension(Uri imageURI) {
ContentResolver contentResolver = getContentResolver();
MimeTypeMap mimeTypeMap = MimeTypeMap.getSingleton();
return mimeTypeMap.getExtensionFromMimeType(contentResolver.getType(imageURI));
}
private void showToast(String message) {
Toast.makeText(this, message, Toast.LENGTH_LONG).show();
}
}
\ No newline at end of file
package com.kaviz.heal.Adapters;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.kaviz.heal.Interfaces.ClickEvents;
import com.kaviz.heal.Model.Pharmacy;
import com.kaviz.heal.R;
import com.kaviz.heal.databinding.PharmacyListDesignBinding;
import java.util.ArrayList;
public class PharmacyAdapter extends RecyclerView.Adapter<PharmacyAdapter.PharmacyViewHolder> {
private Context context;
private ArrayList<Pharmacy>pharmacyList;
private ClickEvents clickEvents;
public PharmacyAdapter(Context context, ArrayList<Pharmacy> pharmacyList, ClickEvents clickEvents) {
this.context = context;
this.pharmacyList = pharmacyList;
this.clickEvents = clickEvents;
}
@NonNull
@Override
public PharmacyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return new PharmacyViewHolder(LayoutInflater.from(context).inflate(R.layout.pharmacy_list_design, parent, false));
}
@Override
public void onBindViewHolder(@NonNull PharmacyViewHolder holder, int position) {
Pharmacy pharmacy = pharmacyList.get(position);
String pharmacyName = "Pharmacy Name : "+pharmacy.getName();
String distance = "Distance : "+pharmacy.getDistance();
String availableMedicines = "Available Medicines : "+pharmacy.getAvailable_medicines()
.replace("[", "").replace("]", "").replace("'", "");
holder.binding.pharmacyName.setText(pharmacyName);
holder.binding.distanceText.setText(distance);
holder.binding.availableMedicinesText.setText(availableMedicines);
}
@Override
public int getItemCount() {
return pharmacyList.size();
}
public class PharmacyViewHolder extends RecyclerView.ViewHolder {
PharmacyListDesignBinding binding;
public PharmacyViewHolder(@NonNull View itemView) {
super(itemView);
binding = PharmacyListDesignBinding.bind(itemView);
itemView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
clickEvents.onClick(getAdapterPosition());
}
});
}
}
}
package com.kaviz.heal.Interfaces;
public interface ClickEvents {
void onClick(int position);
}
package com.kaviz.heal.Model;
import java.io.Serializable;
public class Pharmacy implements Serializable {
private String name;
private String distance;
private String available_medicines;
public Pharmacy() {
}
public Pharmacy(String name, String distance, String available_medicines) {
this.name = name;
this.distance = distance;
this.available_medicines = available_medicines;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDistance() {
return distance;
}
public void setDistance(String distance) {
this.distance = distance;
}
public String getAvailable_medicines() {
return available_medicines;
}
public void setAvailable_medicines(String available_medicines) {
this.available_medicines = available_medicines;
}
}
package com.kaviz.heal.Model;
public class ResponseModelOne {
private String status;
private int [] HeartRate;
private int [] BloodOxygenLevel;
private int [] BodyTemperature;
private String RiskLevel;
public ResponseModelOne() {
}
public ResponseModelOne(String status, int[] heartRate, int[] bloodOxygenLevel, int[] bodyTemperature, String riskLevel) {
this.status = status;
HeartRate = heartRate;
BloodOxygenLevel = bloodOxygenLevel;
BodyTemperature = bodyTemperature;
RiskLevel = riskLevel;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public int[] getHeartRate() {
return HeartRate;
}
public void setHeartRate(int[] heartRate) {
HeartRate = heartRate;
}
public int[] getBloodOxygenLevel() {
return BloodOxygenLevel;
}
public void setBloodOxygenLevel(int[] bloodOxygenLevel) {
BloodOxygenLevel = bloodOxygenLevel;
}
public int[] getBodyTemperature() {
return BodyTemperature;
}
public void setBodyTemperature(int[] bodyTemperature) {
BodyTemperature = bodyTemperature;
}
public String getRiskLevel() {
return RiskLevel;
}
public void setRiskLevel(String riskLevel) {
RiskLevel = riskLevel;
}
}
package com.kaviz.heal.Model;
import java.util.List;
public class ResponseModelThree {
private String status;
private List<Pharmacy> pharmacy_recommendation;
public ResponseModelThree() {
}
public ResponseModelThree(String status, List<Pharmacy> pharmacy_recommendation) {
this.status = status;
this.pharmacy_recommendation = pharmacy_recommendation;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public List<Pharmacy> getPharmacy_recommendation() {
return pharmacy_recommendation;
}
public void setPharmacy_recommendation(List<Pharmacy> pharmacy_recommendation) {
this.pharmacy_recommendation = pharmacy_recommendation;
}
}
package com.kaviz.heal.Model;
public class ResponseModelTwo {
private String status;
private int [] HeartRate;
private int [] BloodOxygenLevel;
private int [] BodyTemperature;
private String ExercisePlan;
private String DietPlan;
public ResponseModelTwo() {
}
public ResponseModelTwo(String status, int[] heartRate, int[] bloodOxygenLevel, int[] bodyTemperature, String exercisePlan, String dietPlan) {
this.status = status;
HeartRate = heartRate;
BloodOxygenLevel = bloodOxygenLevel;
BodyTemperature = bodyTemperature;
ExercisePlan = exercisePlan;
DietPlan = dietPlan;
}
public String getStatus() {
return status;
}
public void setSuccess(String success) {
this.status = success;
}
public int[] getHeartRate() {
return HeartRate;
}
public void setHeartRate(int[] heartRate) {
HeartRate = heartRate;
}
public int[] getBloodOxygenLevel() {
return BloodOxygenLevel;
}
public void setBloodOxygenLevel(int[] bloodOxygenLevel) {
BloodOxygenLevel = bloodOxygenLevel;
}
public int[] getBodyTemperature() {
return BodyTemperature;
}
public void setBodyTemperature(int[] bodyTemperature) {
BodyTemperature = bodyTemperature;
}
public String getExercisePlan() {
return ExercisePlan;
}
public void setExercisePlan(String exercisePlan) {
ExercisePlan = exercisePlan;
}
public String getDietPlan() {
return DietPlan;
}
public void setDietPlan(String dietPlan) {
DietPlan = dietPlan;
}
}
package com.kaviz.heal.Model;
public class User {
private String name;
private String email;
private String password;
private double height;
private double weight;
private String address;
private String gender;
private String imageURL;
public User() {
}
public User(String email, String password) {
this.email = email;
this.password = password;
}
public User(String name, double height, double weight, String address, String gender, String imageURL) {
this.name = name;
this.height = height;
this.weight = weight;
this.address = address;
this.gender = gender;
this.imageURL = imageURL;
}
public String getName() {
return name;
}
public String getEmail() {
return email;
}
public String getPassword() {
return password;
}
public double getHeight() {
return height;
}
public double getWeight() {
return weight;
}
public String getAddress() {
return address;
}
public String getGender() {
return gender;
}
public String getImageURL() {
return imageURL;
}
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:color="@color/themeBlue"
android:width="1dp"/>
<corners
android:radius="100dp"/>
</shape>
\ No newline at end of file
<vector android:height="24dp" android:tint="#2EA7D6"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM20,8l-8,5 -8,-5L4,6l8,5 8,-5v2z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>
<vector android:height="24dp" android:tint="#FCFEFF"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
</vector>
<vector android:height="24dp" android:tint="#2EA7D6"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M12.65,10C11.83,7.67 9.61,6 7,6c-3.31,0 -6,2.69 -6,6s2.69,6 6,6c2.61,0 4.83,-1.67 5.65,-4H17v4h4v-4h2v-4H12.65zM7,14c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:shape="rectangle">
<solid
android:color="@color/white"/>
<corners
android:radius="10dp"/>
</shape>
</item>
</layer-list>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners
android:radius="300dp"/>
<solid
android:color="@color/themeBlue"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient
android:startColor="#FF00CC"
android:endColor="#333399"
android:type="linear"
android:angle="0"/>
</shape>
</item>
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activities.ChatBotActivity">
<WebView
android:id="@+id/chatBotWebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activities.ChatRobotActivity">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activities.GraphsAndPredictionActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="180dp"
android:layout_centerHorizontal="true"
android:visibility="gone"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="vertical">
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/bloodOxygenLevelBarChart"
android:layout_width="match_parent"
android:layout_height="400dp"
android:layout_margin="16dp"/>
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/heartRateBarChart"
android:layout_width="match_parent"
android:layout_height="400dp"
android:layout_margin="16dp"/>
<com.github.mikephil.charting.charts.BarChart
android:id="@+id/bodyTemperatureBarChart"
android:layout_width="match_parent"
android:layout_height="400dp"
android:layout_margin="16dp"/>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_margin="20dp"
app:cardCornerRadius="12dp"
app:cardBackgroundColor="@color/themeBlue"
app:cardElevation="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="@color/white"
android:textAlignment="center"
android:text="@string/future_predictions"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/according_to_the_data_analyzed"
android:textColor="@color/white"
android:textStyle="italic"
android:textSize="16sp"
android:textAlignment="center"
android:layout_marginTop="2dp"/>
<TextView
android:id="@+id/predictionText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:textSize="16sp"
android:textColor="@color/white"
android:padding="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="16dp"
android:layout_gravity="center"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:context=".Activities.HealthTipsActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/transparent"
android:layout_alignParentTop="true">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="8dp"
app:cardCornerRadius="12dp"
app:cardBackgroundColor="@color/themeBlue"
app:cardElevation="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="@color/white"
android:textAlignment="center"
android:text="@string/exercise_plan"/>
<TextView
android:id="@+id/exercisePlanText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/white"
android:textStyle="italic"
android:textSize="16sp"
android:padding="16dp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="250dp"
android:layout_marginTop="8dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="20dp"
app:cardCornerRadius="12dp"
app:cardBackgroundColor="@color/themeBlue"
app:cardElevation="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textSize="18sp"
android:textStyle="bold"
android:textColor="@color/white"
android:textAlignment="center"
android:text="@string/diet_plan"/>
<TextView
android:id="@+id/dietPlanText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textColor="@color/white"
android:textStyle="italic"
android:textSize="16sp"
android:padding="16dp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone"
android:indeterminateTint="@android:color/holo_red_light"/>
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Activities.HomeActivity">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolBar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/themeBlue">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/menuIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/menu"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:contentDescription="@string/menu"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/health_tracker"
android:layout_centerInParent="true"
android:textColor="@color/white"
android:textSize="18sp"
android:textStyle="bold"/>
</RelativeLayout>
</androidx.appcompat.widget.Toolbar>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:layout_width="75dp"
android:layout_height="75dp"
android:src="@drawable/heart"
android:layout_margin="16dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:contentDescription="@string/heart"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_centerInParent="true"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
android:background="@android:color/transparent"
android:layout_marginBottom="7dp">
<androidx.cardview.widget.CardView
android:id="@+id/graphsAndPrediction"
android:layout_width="0dp"
android:layout_height="110dp"
android:layout_weight="1"
android:padding="10dp"
app:cardCornerRadius="20dp"
app:cardBackgroundColor="#53b2d4"
android:layout_marginEnd="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="@android:color/transparent">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/graph"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/graph" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/graphs_future_predictions"
android:textAlignment="center"
android:textSize="16sp"
android:textColor="@color/white"
android:layout_margin="10dp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/prescriptionScanning"
android:layout_width="0dp"
android:layout_height="110dp"
android:layout_weight="1"
android:padding="10dp"
app:cardCornerRadius="20dp"
app:cardBackgroundColor="#4981bc"
android:layout_marginStart="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="@android:color/transparent">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/camera"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/camera" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/prescription_scan"
android:textAlignment="center"
android:textSize="16sp"
android:textColor="@color/white"
android:layout_margin="10dp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:weightSum="2"
android:background="@android:color/transparent"
android:layout_marginTop="7dp">
<androidx.cardview.widget.CardView
android:id="@+id/healthTips"
android:layout_width="0dp"
android:layout_height="110dp"
android:layout_weight="1"
android:padding="10dp"
app:cardCornerRadius="20dp"
app:cardBackgroundColor="#605396"
android:layout_marginEnd="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="@android:color/transparent">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/healthcare"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/health" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/health_tips"
android:textAlignment="center"
android:textSize="16sp"
android:textColor="@color/white"
android:layout_margin="10dp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/liveChat"
android:layout_width="0dp"
android:layout_height="110dp"
android:layout_weight="1"
android:padding="10dp"
app:cardCornerRadius="20dp"
app:cardBackgroundColor="#5e4271"
android:layout_marginStart="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="@android:color/transparent">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/live_chat"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/live_chat" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/live_chat"
android:textAlignment="center"
android:textSize="16sp"
android:textColor="@color/white"
android:layout_margin="10dp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
<androidx.cardview.widget.CardView
android:id="@+id/chatBotSecond"
android:layout_width="200dp"
android:layout_height="110dp"
android:padding="10dp"
app:cardCornerRadius="20dp"
android:layout_gravity="center"
app:cardBackgroundColor="@color/themeBlue"
android:layout_marginTop="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="@android:color/transparent">
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:src="@drawable/robot"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/graph" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/robot_solutions"
android:textAlignment="center"
android:textSize="16sp"
android:textColor="@color/white"
android:layout_margin="10dp"
android:textStyle="bold"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</LinearLayout>
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/splash_screen_gradient"
tools:context=".Activities.Authentication.MainActivity">
<LinearLayout
android:id="@+id/textLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:orientation="vertical"
android:layout_centerInParent="true"
android:background="@android:color/transparent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/app_name"
android:textColor="@color/white"
android:textSize="45sp"
android:fontFamily="@font/dirtyline"
android:layout_gravity="center_horizontal"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/health_tracker"
android:textColor="@color/white"
android:textSize="18sp"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
<androidx.cardview.widget.CardView
android:id="@+id/loginAreaLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_centerInParent="true"
app:cardElevation="12dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/transparent">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:indeterminateTint="@color/themeBlue"
android:visibility="gone"/>
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/heal_logo"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/logo" />
<EditText
android:id="@+id/emailText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:autofillHints="emailAddress"
android:inputType="textEmailAddress"
android:hint="@string/email"
android:padding="13dp"
android:drawableStart="@drawable/email"
android:drawablePadding="8dp"
android:background="@drawable/edit_text_background"/>
<EditText
android:id="@+id/passwordText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:autofillHints="password"
android:inputType="textPassword"
android:hint="@string/password"
android:padding="13dp"
android:drawablePadding="8dp"
android:drawableStart="@drawable/password"
android:background="@drawable/edit_text_background"/>
<Button
android:id="@+id/loginButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/login"
android:backgroundTint="@color/themeBlue"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
<TextView
android:id="@+id/newUserText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/new_user_register_now_text"
android:textAlignment="textEnd"
android:textColor="@color/themeBlue"
android:padding="3dp"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="16dp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Activities.PrescriptionScanActivity">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="gone"
android:indeterminateTint="@color/themeBlue"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/buttonLayout"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_margin="16dp">
<TextView
android:id="@+id/dataText"
android:padding="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="@string/click_the_scan_button_to_start_the_process"
android:textColor="@color/black"/>
</ScrollView>
<LinearLayout
android:id="@+id/buttonLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="horizontal"
android:layout_margin="6dp"
android:background="@android:color/transparent">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/scanButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/themeBlue"
android:textColor="@color/white"
android:text="@string/scan"
android:layout_margin="10dp"/>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/sendPrescriptionButton"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@color/themeBlue"
android:textColor="@color/white"
android:text="@string/send_prescription"
android:textAlignment="center"
android:layout_margin="10dp"
android:visibility="gone"/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@drawable/splash_screen_gradient"
tools:context=".Activities.Authentication.RegisterActivity">
<androidx.cardview.widget.CardView
android:id="@+id/loginAreaLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:layout_centerInParent="true"
app:cardElevation="12dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@android:color/transparent">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:layout_marginBottom="8dp"
android:indeterminateTint="@color/themeBlue"
android:visibility="gone"/>
<ImageView
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/heal_logo"
android:layout_gravity="center_horizontal"
android:contentDescription="@string/logo" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello_there_let_s_sign_up"
android:textAlignment="center"
android:textColor="@color/themeBlue"
android:textSize="18sp"
android:textStyle="bold"
android:fontFamily="@font/often"
android:layout_marginBottom="4dp"/>
<EditText
android:id="@+id/emailText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:autofillHints="emailAddress"
android:inputType="textEmailAddress"
android:hint="@string/email"
android:padding="13dp"
android:drawableStart="@drawable/email"
android:drawablePadding="8dp"
android:background="@drawable/edit_text_background"/>
<EditText
android:id="@+id/passwordText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:autofillHints="password"
android:inputType="textPassword"
android:hint="@string/password"
android:padding="13dp"
android:drawablePadding="8dp"
android:drawableStart="@drawable/password"
android:background="@drawable/edit_text_background"/>
<Button
android:id="@+id/registerButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/register"
android:backgroundTint="@color/themeBlue"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"/>
<TextView
android:id="@+id/alreadyUserText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/already_user_login"
android:textAlignment="textEnd"
android:textColor="@color/themeBlue"
android:padding="3dp"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="16dp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
</RelativeLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context=".Activities.ShowPharmaciesActivity">
<ProgressBar
android:id="@+id/progressBar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:indeterminateTint="@color/purple_700"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/pharmacyRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ededed"
tools:context=".Activities.UserDetailsActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/hello_there"
android:textAlignment="center"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textColor="#333333"
android:textSize="18sp"
android:textStyle="bold"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/please_enter_the_required_information_below"
android:textAlignment="center"
android:layout_marginTop="4dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:textColor="#333333"
android:textSize="16sp"/>
<com.mikhaellopez.circularimageview.CircularImageView
android:id="@+id/userProfilePicture"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/user_placeholder"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="10dp"
android:layout_gravity="center_horizontal"
app:civ_border_color="@color/themeBlue"
app:civ_border_width="2dp"/>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="6dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<EditText
android:id="@+id/nameText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/name"
android:autofillHints="name"
android:inputType="textPersonName" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<EditText
android:id="@+id/heightText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/height"
android:autofillHints="number"
android:inputType="numberDecimal" />
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enter_the_value_in_inches"
android:textAlignment="center"
android:textColor="@color/black"
android:layout_marginBottom="8dp"/>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<EditText
android:id="@+id/weightText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/weight"
android:autofillHints="number"
android:inputType="numberDecimal"/>
</com.google.android.material.textfield.TextInputLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/enter_the_value_in_kg"
android:textAlignment="center"
android:textColor="@color/black"
android:layout_marginBottom="8dp"/>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox">
<EditText
android:id="@+id/addressText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/address"
android:autofillHints="postalAddress"
android:inputType="textMultiLine" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="6dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/sex"
android:layout_gravity="center_vertical"
android:textSize="16sp"
android:textColor="@color/themeBlue"
android:layout_marginEnd="12dp"/>
<RadioGroup
android:id="@+id/genderGroup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<RadioButton
android:id="@+id/maleRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/male"
android:buttonTint="@color/themeBlue"/>
<RadioButton
android:id="@+id/femaleRadioButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/female"
android:buttonTint="@color/themeBlue"/>
</RadioGroup>
</LinearLayout>
<Button
android:id="@+id/submitButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/submit"
android:backgroundTint="@color/themeBlue"
android:layout_gravity="center_horizontal"
android:layout_marginTop="8dp"/>
<TextView
android:id="@+id/alreadyUserText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/already_user_login"
android:textAlignment="textEnd"
android:textColor="@color/themeBlue"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="32dp"/>
</LinearLayout>
</ScrollView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content">
<EditText
android:id="@+id/numberNameText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/enter_number"
android:autofillHints="phone"
android:inputType="phone"
android:textColor="@color/black"
android:backgroundTint="@color/themeBlue"
android:textCursorDrawable="@null"
android:layout_marginLeft="32dp"
android:layout_marginTop="32dp"
android:layout_marginRight="32dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/addNumberButton"
android:layout_width="120dp"
android:layout_height="40dp"
android:layout_marginLeft="32dp"
android:layout_marginTop="22dp"
android:layout_marginRight="32dp"
android:layout_marginBottom="32dp"
android:text="@string/add_number"
android:background="@drawable/round_corner_button"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/numberNameText" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="8dp"
app:cardBackgroundColor="@color/themeBlue"
android:layout_marginTop="8dp"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:id="@+id/pharmacyName"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textStyle="bold"
android:textSize="15sp"
android:padding="6dp"/>
<TextView
android:id="@+id/distanceText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="15sp"
android:padding="6dp"/>
<TextView
android:id="@+id/availableMedicinesText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:textSize="15sp"
android:padding="6dp"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/logOutUser"
android:title="@string/log_out"/>
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Heal" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/black</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_200</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="themeBlue">#2ea7d6</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">Heal</string>
<string name="health_tracker">Health Tracker</string>
<string name="email">Email</string>
<string name="password">Password</string>
<string name="login">Login</string>
<string name="logo">Logo</string>
<string name="new_user_register_now_text">New User? Register</string>
<string name="hello_there">Hello There</string>
<string name="please_enter_the_required_information_below">Please enter the required information below</string>
<string name="name">Name</string>
<string name="height">Height</string>
<string name="weight">Weight</string>
<string name="address">Address</string>
<string name="enter_password">Enter Password</string>
<string name="sex">Gender</string>
<string name="male">Male</string>
<string name="female">Female</string>
<string name="register">Register</string>
<string name="already_user_login">Already User? Login</string>
<string name="hello_there_let_s_sign_up">Hello There, Let\'s Sign Up</string>
<string name="enter_the_value_in_inches">(Enter the value in inches)</string>
<string name="submit">Submit</string>
<string name="enter_the_value_in_kg">Enter the value in KG</string>
<string name="heart">Heart</string>
<string name="graphs_future_predictions"><![CDATA[Graphs & Future Predictions]]></string>
<string name="graph">Graph</string>
<string name="camera">Camera</string>
<string name="prescription_scan">Prescription Scan</string>
<string name="health">Health</string>
<string name="live_chat">Live Chat</string>
<string name="menu">Menu</string>
<string name="future_predictions">Future Predictions</string>
<string name="according_to_the_data_analyzed">According to the data analyzed,</string>
<string name="health_tips">Health Tips</string>
<string name="exercise_plan">Exercise Plan</string>
<string name="diet_plan">Diet Plan</string>
<string name="scan">Scan</string>
<string name="send_prescription">Send Prescription</string>
<string name="retake">Retake</string>
<string name="click_the_scan_button_to_start_the_process">Click the Scan button to start the process</string>
<string name="log_out">Log Out</string>
<string name="add_number">Add Order</string>
<string name="enter_number">Enter Your Mobile Number</string>
<string name="robot_solutions">Robot Solutions</string>
</resources>
\ No newline at end of file
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Heal" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/themeBlue</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="UserDetailsTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/themeBlue</item>
<item name="colorPrimaryVariant">@color/themeBlue</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
</style>
<style name="HomeTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/themeBlue</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
<item name="colorControlNormal">@color/white</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample backup rules file; uncomment and customize as necessary.
See https://developer.android.com/guide/topics/data/autobackup
for details.
Note: This file is ignored for devices older that API 31
See https://developer.android.com/about/versions/12/backup-restore
-->
<full-backup-content>
<!--
<include domain="sharedpref" path="."/>
<exclude domain="sharedpref" path="device.xml"/>
-->
</full-backup-content>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?><!--
Sample data extraction rules file; uncomment and customize as necessary.
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
for details.
-->
<data-extraction-rules>
<cloud-backup>
<!-- TODO: Use <include> and <exclude> to control what is backed up.
<include .../>
<exclude .../>
-->
</cloud-backup>
<!--
<device-transfer>
<include .../>
<exclude .../>
</device-transfer>
-->
</data-extraction-rules>
\ No newline at end of file
package com.kaviz.heal;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}
\ No newline at end of file
buildscript {
dependencies {
classpath 'com.google.gms:google-services:4.3.14'
}
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
}
\ No newline at end of file
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
\ No newline at end of file
#Tue Nov 08 19:14:29 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = "Heal"
include ':app'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment