Commit fda9d09d authored by Kavindu Randika's avatar Kavindu Randika

Photo recognition

parent 0edd0de4
...@@ -12,6 +12,6 @@ ...@@ -12,6 +12,6 @@
</deviceKey> </deviceKey>
</Target> </Target>
</targetSelectedWithDropDown> </targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2021-10-12T20:49:47.662287500Z" /> <timeTargetWasSelectedWithDropDown value="2021-10-13T07:58:13.646638Z" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -3,24 +3,31 @@ ...@@ -3,24 +3,31 @@
<component name="DesignSurface"> <component name="DesignSurface">
<option name="filePathToZoomLevelMap"> <option name="filePathToZoomLevelMap">
<map> <map>
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/drawable/chat_icon.xml" value="0.2" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/drawable/ic_medic.xml" value="0.1962962962962963" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/drawable/tab_color.xml" value="0.1125" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/drawable/tab_color.xml" value="0.1125" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_deasis_show.xml" value="0.25" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_deasis_show.xml" value="0.25" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_duty_calling.xml" value="0.19166666666666668" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_duty_calling.xml" value="0.19166666666666668" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_main.xml" value="0.19270833333333334" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_main.xml" value="0.19270833333333334" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_sing_in.xml" value="0.3596014492753623" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_sing_in.xml" value="0.3596014492753623" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_singup.xml" value="0.20572916666666666" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/activity_singup.xml" value="0.20572916666666666" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/bot_msg_rv_item.xml" value="0.1703125" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/deasisecheck.xml" value="0.22" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/deasisecheck.xml" value="0.22" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_camera.xml" value="0.1" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_camera.xml" value="0.33" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_chat.xml" value="0.12771739130434784" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_chat.xml" value="0.5" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_medc.xml" value="0.12771739130434784" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_medc.xml" value="0.12771739130434784" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_search.xml" value="0.2199546485260771" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/fragment_search.xml" value="0.2199546485260771" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/frame_textview.xml" value="0.22" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/frame_textview.xml" value="0.22" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/showdeasislayout.xml" value="0.25" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/showdeasislayout.xml" value="0.25" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/showdoctors.xml" value="0.21354166666666666" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/showdoctors.xml" value="0.21354166666666666" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/textview_border.xml" value="0.20572916666666666" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/textview_border.xml" value="0.20572916666666666" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/layout/user_msg_rv_item.xml" value="0.1" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/menu/doctormenu.xml" value="0.21354166666666666" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/menu/doctormenu.xml" value="0.21354166666666666" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/menu/menu.xml" value="0.20416666666666666" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/menu/menu.xml" value="0.20416666666666666" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/menu/search_menu.xml" value="0.22" /> <entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/menu/search_menu.xml" value="0.22" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml" value="0.2" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml" value="0.221875" />
<entry key="..\:/Users/wishwa/StudioProjects/Skidndiseaseapp/app/src/main/res/xml/file_paths.xml" value="0.23229166666666667" />
</map> </map>
</option> </option>
</component> </component>
......
...@@ -31,8 +31,8 @@ android { ...@@ -31,8 +31,8 @@ android {
dependencies { dependencies {
implementation 'com.android.volley:volley:1.2.1' implementation 'com.android.volley:volley:1.2.1'
implementation 'com.loopj.android:android-async-http:1.4.9' implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0' implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:requestLegacyExternalStorage="true"
package="com.project.skidn_disease_app"> package="com.project.skidn_disease_app">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<application <application
...@@ -10,6 +17,7 @@ ...@@ -10,6 +17,7 @@
android:label="@string/app_name" android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true" android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/Theme.Skidndiseaseapp"> android:theme="@style/Theme.Skidndiseaseapp">
<activity <activity
android:name=".DutyCalling" android:name=".DutyCalling"
...@@ -32,6 +40,15 @@ ...@@ -32,6 +40,15 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="com.project.skidn_disease_app.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
</application> </application>
</manifest> </manifest>
\ No newline at end of file
package com.project.skidn_disease_app; package com.project.skidn_disease_app.Adapters;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.CheckBox; import android.widget.CheckBox;
import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.project.skidn_disease_app.QuantityListner;
import com.project.skidn_disease_app.R;
import java.util.ArrayList; import java.util.ArrayList;
public class DeasisAdapter extends RecyclerView.Adapter<DeasisAdapter.ViewHolder> { public class DeasisAdapter extends RecyclerView.Adapter<DeasisAdapter.ViewHolder> {
......
package com.project.skidn_disease_app; package com.project.skidn_disease_app.Adapters;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
...@@ -9,6 +9,8 @@ import android.widget.TextView; ...@@ -9,6 +9,8 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.project.skidn_disease_app.R;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
......
package com.project.skidn_disease_app; package com.project.skidn_disease_app.Adapters;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
......
package com.project.skidn_disease_app; package com.project.skidn_disease_app.Adapters;
import android.content.Context; import android.content.Context;
import android.view.LayoutInflater; import android.view.LayoutInflater;
...@@ -9,6 +9,8 @@ import android.widget.TextView; ...@@ -9,6 +9,8 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.project.skidn_disease_app.R;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
......
...@@ -3,10 +3,30 @@ package com.project.skidn_disease_app; ...@@ -3,10 +3,30 @@ package com.project.skidn_disease_app;
import android.os.Bundle; import android.os.Bundle;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.Toast;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.RetryPolicy;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.project.skidn_disease_app.Adapters.ChatRvAdpater;
import com.project.skidn_disease_app.model.ChatModal;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
...@@ -14,6 +34,14 @@ import android.view.ViewGroup; ...@@ -14,6 +34,14 @@ import android.view.ViewGroup;
* create an instance of this fragment. * create an instance of this fragment.
*/ */
public class ChatFragment extends Fragment { public class ChatFragment extends Fragment {
View view;
private RecyclerView charsRv;
private EditText userEdittext;
private FloatingActionButton sendMsgBtn;
private final String BOT_KEY = "bot";
private final String USER_KEY = "user";
private ArrayList<ChatModal> chatModals;
private ChatRvAdpater chatRvAdpater;
// TODO: Rename parameter arguments, choose names that match // TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
...@@ -46,6 +74,8 @@ public class ChatFragment extends Fragment { ...@@ -46,6 +74,8 @@ public class ChatFragment extends Fragment {
return fragment; return fragment;
} }
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
...@@ -54,12 +84,96 @@ public class ChatFragment extends Fragment { ...@@ -54,12 +84,96 @@ public class ChatFragment extends Fragment {
mParam2 = getArguments().getString(ARG_PARAM2); mParam2 = getArguments().getString(ARG_PARAM2);
} }
getActivity().setTitle("Chat"); getActivity().setTitle("Chat");
getActivity().setTitleColor(R.color.bot_back_color);
} }
private void getResponce(String msg,final VolleyCallBack callBack) throws JSONException {
chatModals.add(new ChatModal(msg,USER_KEY));
chatRvAdpater.notifyDataSetChanged();
String url = "http://10.0.2.2:8000/api/chatbot";
String baseurl = "http://10.0.2.2:8000/api/chatbot";
String quary = "{\n \"msg\": \"hi\"\n}";
JSONObject jsonBody = new JSONObject(quary);
System.out.println("here");
JsonObjectRequest req = new JsonObjectRequest(Request.Method.POST,url, jsonBody, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
System.out.println("RESPONCE");
System.out.println(response);
try {
String bot_msg = (String) response.get("msg");
System.out.println(bot_msg);
chatModals.add(new ChatModal(bot_msg,BOT_KEY));
chatRvAdpater.notifyDataSetChanged();
} catch (JSONException e) {
e.printStackTrace();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
System.out.println(error.toString());
chatModals.add(new ChatModal("Please Re-enter your message",BOT_KEY));
System.out.println("ERROR");
}
});
req.setRetryPolicy(new RetryPolicy() {
@Override
public int getCurrentTimeout() {
return 5000000;
}
@Override
public int getCurrentRetryCount() {
return 5000000;
}
@Override
public void retry(VolleyError error) throws VolleyError {
}
});
RequestQueue requestQueue = Volley.newRequestQueue(this.getContext());
requestQueue.add(req);
}
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
// Inflate the layout for this fragment view = inflater.inflate(R.layout.fragment_chat, container, false);
return inflater.inflate(R.layout.fragment_chat, container, false); // recyclerView = (RecyclerView) view.findViewById(R.id.medecrecyele_view);
charsRv = view.findViewById(R.id.reChatView);
userEdittext = view.findViewById(R.id.msgEt);
sendMsgBtn = view.findViewById(R.id.idFBASend);
chatModals = new ArrayList<>();
LinearLayoutManager manager = new LinearLayoutManager(this.getContext());
chatRvAdpater = new ChatRvAdpater(chatModals,getContext());
charsRv.setLayoutManager(manager);
charsRv.setAdapter(chatRvAdpater);
sendMsgBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if(userEdittext.getText().toString().isEmpty()){
Toast.makeText(getContext(),"Please Enter Your Message",Toast.LENGTH_SHORT).show();
return;
}
System.out.println("ssssssssss");
System.out.println(userEdittext.getText().toString().trim());
System.out.println("ssssssssss");
try {
getResponce(userEdittext.getText().toString().trim(), new VolleyCallBack() {
@Override
public void onSuccess() {
System.out.println("sucss");
}
});
} catch (JSONException e) {
e.printStackTrace();
}
userEdittext.setText("");
}
});
return view;
} }
} }
\ No newline at end of file
...@@ -6,7 +6,8 @@ import androidx.recyclerview.widget.RecyclerView; ...@@ -6,7 +6,8 @@ import androidx.recyclerview.widget.RecyclerView;
import android.os.Bundle; import android.os.Bundle;
import java.io.Reader; import com.project.skidn_disease_app.Adapters.DeasisShowAdapter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
......
package com.project.skidn_disease_app; package com.project.skidn_disease_app;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
...@@ -20,14 +19,11 @@ import android.view.ViewGroup; ...@@ -20,14 +19,11 @@ import android.view.ViewGroup;
import com.android.volley.Request; import com.android.volley.Request;
import com.android.volley.RequestQueue; import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonArrayRequest; import com.android.volley.toolbox.JsonArrayRequest;
import com.android.volley.toolbox.Volley; import com.android.volley.toolbox.Volley;
import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser; import com.project.skidn_disease_app.Adapters.DoctorListAdapter;
import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
...@@ -153,6 +149,7 @@ public class MedcFragment extends Fragment { ...@@ -153,6 +149,7 @@ public class MedcFragment extends Fragment {
recyclerView.setAdapter(medecAdapter); recyclerView.setAdapter(medecAdapter);
}}); }});
getActivity().setTitle("Medical Channling"); getActivity().setTitle("Medical Channling");
getActivity().setTitleColor(R.color.bot_back_color);
} }
......
...@@ -10,31 +10,20 @@ import androidx.fragment.app.Fragment; ...@@ -10,31 +10,20 @@ import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
import android.view.MenuInflater; import android.view.MenuInflater;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Toast;
import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.RequestQueue; import com.android.volley.RequestQueue;
import com.android.volley.Response; import com.android.volley.Response;
import com.android.volley.VolleyError; import com.android.volley.VolleyError;
import com.android.volley.VolleyLog; import com.android.volley.VolleyLog;
import com.android.volley.toolbox.JsonObjectRequest; import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.JsonRequest;
import com.android.volley.toolbox.RequestFuture;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley; import com.android.volley.toolbox.Volley;
import com.google.gson.JsonObject; import com.project.skidn_disease_app.Adapters.DeasisAdapter;
import com.project.skidn_disease_app.model.DeasisModal;
import com.project.skidn_disease_app.network.ApiInterFace;
import com.project.skidn_disease_app.network.ArrayListVals;
import com.project.skidn_disease_app.network.RetrofitClientInstance;
import org.json.JSONArray; import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
...@@ -43,11 +32,6 @@ import org.json.JSONObject; ...@@ -43,11 +32,6 @@ import org.json.JSONObject;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Retrofit;
/** /**
* A simple {@link Fragment} subclass. * A simple {@link Fragment} subclass.
...@@ -406,6 +390,7 @@ public class SearchFragment extends Fragment implements QuantityListner{ ...@@ -406,6 +390,7 @@ public class SearchFragment extends Fragment implements QuantityListner{
} }
setHasOptionsMenu(true); setHasOptionsMenu(true);
getActivity().setTitle("Search"); getActivity().setTitle("Search");
getActivity().setTitleColor(R.color.bot_back_color);
} }
......
...@@ -68,24 +68,21 @@ public class SingIn extends AppCompatActivity { ...@@ -68,24 +68,21 @@ public class SingIn extends AppCompatActivity {
System.out.println("---------"); System.out.println("---------");
System.out.println(email_text); System.out.println(email_text);
System.out.println(password_text); System.out.println(password_text);
System.out.println(FirebaseAuth.getInstance().getCurrentUser().getUid());
String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();
System.out.println("-----------"); System.out.println("-----------");
mAuth.signInWithEmailAndPassword(email_text,password_text).addOnCompleteListener(new OnCompleteListener<AuthResult>() { mAuth.signInWithEmailAndPassword(email_text,password_text).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override @Override
public void onComplete(@NonNull Task<AuthResult> task) { public void onComplete(@NonNull Task<AuthResult> task) {
if(task.isSuccessful()){ if(task.isSuccessful()){
Toast.makeText(SingIn.this,"Sign in Successful",Toast.LENGTH_LONG).show(); Toast.makeText(SingIn.this,"Sign in Successful",Toast.LENGTH_LONG).show();
SharedPreferences.Editor editor = settings.edit(); SharedPreferences.Editor editor = settings.edit();
editor.putString("userid", FirebaseAuth.getInstance().getCurrentUser().getUid().toString()); editor.putString("userid", FirebaseAuth.getInstance().getCurrentUser().getUid().toString());
System.out.println(FirebaseAuth.getInstance().getCurrentUser().getUid().toString()); System.out.println(FirebaseAuth.getInstance().getCurrentUser().getUid().toString());
editor.commit(); editor.commit();
System.out.println("singed innnnnnnnnnnn"); System.out.println("singed innnnnnnnnnnn");
Intent i = new Intent(SingIn.this, DutyCalling.class); Intent intent = new Intent(SingIn.this, DutyCalling.class);
i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP| Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(i); startActivity(intent);
}else{ }else{
Toast.makeText(SingIn.this,"Sign in Unsuccessful",Toast.LENGTH_LONG).show(); Toast.makeText(SingIn.this,"Sign in Unsuccessful",Toast.LENGTH_LONG).show();
......
...@@ -181,8 +181,9 @@ public class Singup extends AppCompatActivity { ...@@ -181,8 +181,9 @@ public class Singup extends AppCompatActivity {
try { try {
justafunction(FirebaseAuth.getInstance().getCurrentUser().getUid().toString(),name_text,email_text,"","","",data, () -> { justafunction(FirebaseAuth.getInstance().getCurrentUser().getUid().toString(),name_text,email_text,"","","",data, () -> {
Toast.makeText(Singup.this,"Doctor is Registered!",Toast.LENGTH_SHORT).show(); Toast.makeText(Singup.this,"Doctor is Registered!",Toast.LENGTH_SHORT).show();
Intent i = new Intent(Singup.this, DutyCalling.class); Intent intent = new Intent(Singup.this, DutyCalling.class);
startActivity(i); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);
// this is where you will call the geofire, here you have the response from the volley. // this is where you will call the geofire, here you have the response from the volley.
}); });
} catch (JSONException e) { } catch (JSONException e) {
......
package com.project.skidn_disease_app.model;
public class ChatModal {
private String message;
private String sender;
public ChatModal(String message, String sender) {
this.message = message;
this.sender = sender;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getSender() {
return sender;
}
public void setSender(String sender) {
this.sender = sender;
}
}
package com.project.skidn_disease_app.model;
public class DeasisFinderModal {
private boolean success;
private Object result;
public DeasisFinderModal(boolean success, Result result) {
this.success = success;
this.result = result;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
public Object getResult() {
return result;
}
public void setResult(Object result) {
this.result = result;
}
}
class Result{
private String name;
private String description;
public Result(String name, String description) {
this.name = name;
this.description = description;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
package com.project.skidn_disease_app.model;
public class RequestModal {
String msg;
public RequestModal(String msg) {
this.msg = msg;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
package com.project.skidn_disease_app.network;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
public interface MultiInterface {
String IMAGEURL = "https://demonuts.com/Demonuts/JsonTest/Tennis/";
@Multipart
@POST("api/predictions/picture")
Call<String> uploadImage(
@Part MultipartBody.Part file
);
}
package com.project.skidn_disease_app.network;
import java.util.concurrent.TimeUnit;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class NetworkClient {
private static Retrofit retrofit;
private static String BASE_URL = "http://10.0.2.2:8000/";
public static Retrofit getRetrofit(){
OkHttpClient okHttpClient = new OkHttpClient.Builder().connectTimeout(3, TimeUnit.MINUTES).callTimeout(3,TimeUnit.MINUTES).readTimeout(3,TimeUnit.MINUTES).build();
if (retrofit==null){
retrofit = new Retrofit.Builder().baseUrl(BASE_URL).
addConverterFactory(GsonConverterFactory.create()).client(okHttpClient).build();
}
return retrofit;
}
}
package com.project.skidn_disease_app.network;
import com.project.skidn_disease_app.model.MsgModal;
import com.project.skidn_disease_app.model.RequestModal;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Url;
public interface RetrofitApi {
@POST("msg")
//on below line we are creating a method to post our data.
Call<RequestModal> createPost(@Body RequestModal dataModal);
}
package com.project.skidn_disease_app.network;
import com.project.skidn_disease_app.model.DeasisFinderModal;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
public interface UploadAPIs {
@Multipart
@POST("api/predictions/picture")
Call<DeasisFinderModal> uploadImage(@Part MultipartBody.Part part);
}
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="499.2dp"
android:height="499.2dp"
android:viewportWidth="499.2"
android:viewportHeight="499.2">
<path
android:pathData="M457.6,497.6v-59.2c0,-44 -35.2,-76.8 -79.2,-76.8H120.8c-44,0 -79.2,32 -79.2,76.8v59.2H457.6z"
android:fillColor="#00C4C4"/>
<path
android:pathData="M41.6,441.6l0,56l416,0l0,-56"
android:fillColor="#08B8BC"/>
<path
android:pathData="M190.4,374.4a59.2,52.8 0,1 0,118.4 0a59.2,52.8 0,1 0,-118.4 0z"
android:fillColor="#36FFF5"/>
<path
android:pathData="M313.6,352.8c0,34.4 -25.6,60.8 -62.4,61.6l0,0c-34.4,0 -65.6,-27.2 -65.6,-61.6V320c0,-34.4 28,-62.4 62.4,-62.4h4c34.4,0 62.4,28 62.4,62.4v32.8H313.6z"
android:fillColor="#5B5B5B"/>
<path
android:pathData="M250.4,260L250.4,260c34.4,0 63.2,28 63.2,62.4v30.4c0,34.4 -24.8,60.8 -62.4,61.6l0,0"
android:fillColor="#3F3F3F"/>
<path
android:pathData="M313.6,337.6l0,-8l-128,0l0,8"
android:fillColor="#686868"/>
<path
android:pathData="M253.6,69.6c0,2.4 -1.6,4 -4,4l0,0c-2.4,0 -4,-1.6 -4,-4v-64c0,-2.4 1.6,-4 4,-4l0,0c2.4,0 4,1.6 4,4V69.6z"
android:fillColor="#0B6382"/>
<path
android:pathData="M249.6,1.6L249.6,1.6c3.2,0 4,2.4 4,4.8v63.2c0,3.2 -0.8,4 -4,4l0,0"
android:fillColor="#00233F"/>
<path
android:pathData="M233.6,65.6h32v32h-32z"
android:fillColor="#F45683"/>
<path
android:pathData="M233.6,65.6l32,0l0,32"
android:fillColor="#E2336D"/>
<path
android:pathData="M245.6,69.6h8v8h-8z"
android:fillColor="#00E2E2"/>
<path
android:pathData="M245.6,14.4l8,0l0,-2.4l-8,0z"
android:fillColor="#15819E"/>
<path
android:pathData="M245.6,24.8l8,0l0,-2.4l-8,0z"
android:fillColor="#15819E"/>
<path
android:pathData="M245.6,35.2l8,0l0,-2.4l-8,0z"
android:fillColor="#15819E"/>
<path
android:pathData="M245.6,44.8l8,0l0,-2.4l-8,0z"
android:fillColor="#15819E"/>
<path
android:pathData="M245.6,55.2l8,0l0,-2.4l-8,0z"
android:fillColor="#15819E"/>
<path
android:pathData="M137.6,136.8c0,9.6 -7.2,16.8 -16.8,16.8H98.4c-9.6,0 -16.8,-7.2 -16.8,-16.8V98.4c0,-9.6 7.2,-16.8 16.8,-16.8h22.4c9.6,0 16.8,7.2 16.8,16.8V136.8z"
android:fillColor="#0B6382"/>
<path
android:pathData="M97.6,81.6H120c9.6,0 17.6,6.4 17.6,16v36c0,9.6 -8.8,20 -17.6,20H97.6"
android:fillColor="#00233F"/>
<path
android:pathData="M409.6,136.8c0,9.6 -7.2,16.8 -16.8,16.8h-22.4c-9.6,0 -16.8,-7.2 -16.8,-16.8V98.4c0,-9.6 7.2,-16.8 16.8,-16.8h22.4c9.6,0 16.8,7.2 16.8,16.8V136.8z"
android:fillColor="#0B6382"/>
<path
android:pathData="M377.6,81.6h16c9.6,0 16,6.4 16,16v36c0,9.6 -6.4,20 -16,20h-16"
android:fillColor="#00233F"/>
<path
android:pathData="M483.2,240c0,44.8 -60.8,81.6 -105.6,97.6h-256C76.8,321.6 16,284.8 16,240L0,172.8C0,128 36.8,89.6 82.4,89.6h335.2c44.8,0 81.6,38.4 81.6,83.2L483.2,240z"
android:fillColor="#00E2E2"/>
<path
android:pathData="M499.2,174.4l-16,65.6c0,44.8 -60.8,81.6 -105.6,97.6h-256C29.6,307.2 16,284.8 16,240L0,174.4"
android:fillColor="#00C4C4"/>
<path
android:pathData="M483.2,240c0,44.8 -60.8,81.6 -105.6,97.6h-256C20,305.6 16,276 16,240"
android:fillColor="#08B8BC"/>
<path
android:pathData="M109.6,205.6m-81.6,0a81.6,81.6 0,1 1,163.2 0a81.6,81.6 0,1 1,-163.2 0"
android:fillColor="#0B6382"/>
<path
android:pathData="M109.6,214.4m-81.6,0a81.6,81.6 0,1 1,163.2 0a81.6,81.6 0,1 1,-163.2 0"
android:strokeAlpha="0.2"
android:fillColor="#727272"
android:fillAlpha="0.2"/>
<path
android:pathData="M109.6,124c44.8,0 81.6,36.8 81.6,81.6s-36.8,81.6 -81.6,81.6"
android:fillColor="#00233F"/>
<path
android:pathData="M109.6,205.6m-55.2,0a55.2,55.2 0,1 1,110.4 0a55.2,55.2 0,1 1,-110.4 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M109.6,205.6m-55.2,0a55.2,55.2 0,1 1,110.4 0a55.2,55.2 0,1 1,-110.4 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M71.2,166.4c21.6,-21.6 56.8,-21.6 78.4,0s21.6,56.8 0,78.4"
android:fillColor="#EFEBE8"/>
<path
android:pathData="M109.6,164.8c29.6,0 53.6,14.4 55.2,44c0,-0.8 0,-2.4 0,-3.2c0,-30.4 -24.8,-55.2 -55.2,-55.2s-55.2,24.8 -55.2,55.2c0,0.8 0,2.4 0,3.2C56.8,180 80.8,164.8 109.6,164.8z"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M92.8,136.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M109.6,136.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M127.2,136.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M120.8,205.6c0,5.6 -4.8,10.4 -10.4,10.4s-10.4,-4.8 -10.4,-10.4c0,-5.6 4.8,-10.4 10.4,-10.4S120.8,200 120.8,205.6z"
android:fillColor="#727272"/>
<path
android:pathData="M109.6,195.2c5.6,0 10.4,4.8 10.4,10.4c0,5.6 -4.8,10.4 -10.4,10.4"
android:fillColor="#3F3F3F"/>
<path
android:pathData="M105.6,200.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M114.4,210.4m-1.6,0a1.6,1.6 0,1 1,3.2 0a1.6,1.6 0,1 1,-3.2 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M384,205.6m-81.6,0a81.6,81.6 0,1 1,163.2 0a81.6,81.6 0,1 1,-163.2 0"
android:fillColor="#0B6382"/>
<path
android:pathData="M384,214.4m-81.6,0a81.6,81.6 0,1 1,163.2 0a81.6,81.6 0,1 1,-163.2 0"
android:strokeAlpha="0.2"
android:fillColor="#727272"
android:fillAlpha="0.2"/>
<path
android:pathData="M384,124c44.8,0 81.6,36.8 81.6,81.6s-36.8,81.6 -81.6,81.6"
android:fillColor="#00233F"/>
<path
android:pathData="M384,205.6m-55.2,0a55.2,55.2 0,1 1,110.4 0a55.2,55.2 0,1 1,-110.4 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M384,205.6m-55.2,0a55.2,55.2 0,1 1,110.4 0a55.2,55.2 0,1 1,-110.4 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M344.8,166.4c21.6,-21.6 56.8,-21.6 78.4,0s21.6,56.8 0,78.4"
android:fillColor="#EFEBE8"/>
<path
android:pathData="M384,164.8c29.6,0 53.6,14.4 55.2,44c0,-0.8 0,-2.4 0,-3.2c0,-30.4 -24.8,-55.2 -55.2,-55.2s-55.2,24.8 -55.2,55.2c0,0.8 0,2.4 0,3.2C330.4,180 354.4,164.8 384,164.8z"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M367.2,136.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M384,136.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M400.8,136.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#CCCAC8"/>
<path
android:pathData="M394.4,205.6c0,5.6 -4.8,10.4 -10.4,10.4s-10.4,-4.8 -10.4,-10.4c0,-5.6 4.8,-10.4 10.4,-10.4S394.4,200 394.4,205.6z"
android:fillColor="#727272"/>
<path
android:pathData="M384,195.2c5.6,0 10.4,4.8 10.4,10.4c0,5.6 -4.8,10.4 -10.4,10.4"
android:fillColor="#3F3F3F"/>
<path
android:pathData="M380,200.8m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M388,210.4m-1.6,0a1.6,1.6 0,1 1,3.2 0a1.6,1.6 0,1 1,-3.2 0"
android:fillColor="#FFFAF5"/>
<path
android:pathData="M104,105.6L104,105.6c0,-4 3.2,-8 7.2,-8h277.6c4,0 7.2,4 7.2,7.2l0,0"
android:fillColor="#36FFF5"/>
<path
android:pathData="M185.6,345.6h128v8h-128z"
android:fillColor="#686868"/>
<path
android:pathData="M81.6,417.6h32v32h-32z"
android:fillColor="#A0D827"/>
<path
android:pathData="M105.6,433.6l-24,11.2l0,-27.2l24,0z"
android:fillColor="#CFF23B"/>
<path
android:pathData="M121.6,417.6h32v32h-32z"
android:fillColor="#F2AE16"/>
<path
android:pathData="M145.6,433.6l-24,11.2l0,-27.2l24,0z"
android:fillColor="#FFCC4D"/>
<path
android:pathData="M409.6,421.6c0,2.4 -1.6,4 -4,4h-56c-2.4,0 -4,-1.6 -4,-4l0,0c0,-2.4 1.6,-4 4,-4h56C408,417.6 409.6,419.2 409.6,421.6L409.6,421.6z"
android:fillColor="#36FFF5"/>
<path
android:pathData="M409.6,445.6c0,2.4 -1.6,4 -4,4h-56c-2.4,0 -4,-1.6 -4,-4l0,0c0,-2.4 1.6,-4 4,-4h56C408,441.6 409.6,443.2 409.6,445.6L409.6,445.6z"
android:fillColor="#36FFF5"/>
<path
android:pathData="M409.6,469.6c0,2.4 -1.6,4 -4,4h-56c-2.4,0 -4,-1.6 -4,-4l0,0c0,-2.4 1.6,-4 4,-4h56C408,465.6 409.6,467.2 409.6,469.6L409.6,469.6z"
android:fillColor="#36FFF5"/>
<path
android:pathData="M297.6,255.2l-48,48l-48,-48l48,15.2z"
android:fillColor="#F45683"/>
<path
android:pathData="M297.6,255.2l-48,48l-48,-48l48,28.8z"
android:fillColor="#E2336D"/>
<path
android:pathData="M249.6,116m-15.2,0a15.2,15.2 0,1 1,30.4 0a15.2,15.2 0,1 1,-30.4 0"
android:fillColor="#F45683"/>
<path
android:pathData="M264.8,116c0,8 -6.4,15.2 -15.2,15.2s-15.2,-6.4 -15.2,-15.2"
android:fillColor="#E2336D"/>
<path
android:pathData="M252,233.6c0,0.8 -0.8,2.4 -2.4,2.4l0,0c-0.8,0 -2.4,-0.8 -2.4,-2.4V128.8c0,-0.8 0.8,-2.4 2.4,-2.4l0,0c0.8,0 2.4,0.8 2.4,2.4V233.6z"
android:fillColor="#E2336D"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="485dp"
android:height="485dp"
android:viewportWidth="485"
android:viewportHeight="485">
<path
android:pathData="M382.5,97.5v180h-56.1c0.1,-0.2 0.3,-0.3 0.4,-0.5c16.5,-21.1 25.7,-49 25.7,-79.5v-55l-110,-60c0,26.9 -110,60 -110,60v55c0,30.5 9.2,58.4 25.7,79.5c0.1,0.2 0.3,0.3 0.4,0.5h-56.1v-180c0,-49.7 40.3,-90 90,-90h100C342.2,7.5 382.5,47.8 382.5,97.5z"
android:fillColor="#FFD248"/>
<path
android:pathData="M212.5,477.5l0,0l-0.9,-1.4l-37.3,-58.6l133.2,0l0.3,0.2l-35.3,59.8z"
android:fillColor="#AFB6BB"/>
<path
android:pathData="M432.5,452.5c0,0 0,11 0,25h-160l35.3,-59.8l29.7,-50.2C432.2,397.5 432.5,452.5 432.5,452.5z"
android:fillColor="#EF7EB1"/>
<path
android:pathData="M212.5,477.5h-160c0,-14 0,-25 0,-25s0.9,-53.1 90.9,-83.6L212.5,477.5z"
android:fillColor="#EF7EB1"/>
<path
android:pathData="M147.5,367.5c0,0 34.1,-17.8 45,-30v-31.8c0.2,0.2 0.5,0.3 0.7,0.4c14.4,7.3 31,11.4 49.3,11.4s34.9,-4.1 49.3,-11.4c0.2,-0.1 0.5,-0.2 0.7,-0.4v31.8c10.9,12.2 45,30 45,30l-29.7,50.2l-0.3,-0.2H174.3l-30.9,-48.6C144.7,368.4 146.1,367.9 147.5,367.5z"
android:fillColor="#FFE1B2"/>
<path
android:pathData="M326.4,277.5c-9.2,11.7 -20.6,21.4 -33.9,28.2c-0.2,0.2 -0.5,0.3 -0.7,0.4c-14.4,7.3 -31,11.4 -49.3,11.4s-34.9,-4.1 -49.3,-11.4c-0.2,-0.1 -0.5,-0.2 -0.7,-0.4c-13.3,-6.8 -24.7,-16.5 -33.9,-28.2c-0.1,-0.2 -0.3,-0.3 -0.4,-0.5c-16.5,-21.1 -25.7,-49 -25.7,-79.5v-55c0,0 110,-33.1 110,-60l110,60v55c0,30.5 -9.2,58.4 -25.7,79.5C326.7,277.2 326.5,277.3 326.4,277.5z"
android:fillColor="#FFE1B2"/>
<path
android:pathData="M340.4,360.552c-8.931,-4.704 -30.922,-17.164 -40.4,-26.105v-24.283c11.264,-6.397 21.316,-14.836 29.963,-25.164H390V97.5C390,43.738 346.262,0 292.5,0h-100C138.738,0 95,43.738 95,97.5V285h60.036c8.648,10.327 18.7,18.767 29.964,25.164v24.283c-9.455,8.92 -42.757,26.866 -44.147,27.398c-93.787,31.837 -95.812,88.146 -95.852,90.528L45,485h395v-32.541C439.986,449.996 438.545,391.89 340.4,360.552zM110,97.5c0,-45.491 37.01,-82.5 82.5,-82.5h100c45.49,0 82.5,37.009 82.5,82.5V270h-34.328C353.193,249.28 360,224.052 360,197.5v-59.452L235,69.866V82.5c0,1.21 -1.412,12.425 -50.323,33.139c-26.816,11.356 -54.066,19.598 -54.338,19.68L125,136.925V197.5c0,26.552 6.807,51.78 19.328,72.5H110V97.5zM164.697,273.12c-0.212,-0.302 -0.423,-0.559 -0.617,-0.776C148.552,252.467 140,225.889 140,197.5v-49.484c9.394,-2.996 29.771,-9.782 50.423,-18.521c36.234,-15.334 50.726,-27.189 56.299,-36.149L345,146.952V197.5c0,28.387 -8.552,54.965 -24.078,74.841c-0.194,0.217 -0.407,0.476 -0.62,0.78c-8.767,11.079 -19.268,19.792 -31.216,25.901l-1.049,0.536l-0.079,0.079C274.213,306.514 258.923,310 242.5,310c-16.408,0 -31.687,-3.48 -45.458,-10.363l-1.128,-0.615C183.966,292.913 173.464,284.199 164.697,273.12zM198.093,342.497l1.907,-2.135v-23.049c13.219,5.099 27.464,7.687 42.5,7.687c15.043,0 29.295,-2.59 42.5,-7.685v23.047l1.907,2.135c8.695,9.732 29.172,21.793 40.168,27.894L303.641,410H178.419l-23.971,-37.703C163.897,367.185 188.367,353.383 198.093,342.497zM294.781,425l-26.563,45h-51.61l-28.644,-45H294.781zM60,452.641c0.048,-0.873 0.886,-12.567 11.093,-27.298c16.635,-24.01 45.773,-38.82 69.177,-47.385L198.825,470H60V452.641zM425,470H285.637l28.618,-48.481l26.626,-45.005c24.68,8.457 55.423,23.311 72.75,47.971c10.718,15.254 11.344,27.458 11.368,28.096L425,470L425,470z"
android:fillColor="#231F20"/>
<path
android:pathData="M242.5,235h20v-15H250v-32.5h-15v40C235,231.642 238.357,235 242.5,235z"
android:fillColor="#231F20"/>
</vector>
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:onClick="siginActivity" android:onClick="siginActivity"
android:textColor="@color/bot_back_color"
android:layout_marginTop="40dp" android:layout_marginTop="40dp"
android:text="Sign In" /> android:text="Sign In" />
......
...@@ -105,6 +105,7 @@ ...@@ -105,6 +105,7 @@
android:id="@+id/button2" android:id="@+id/button2"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/bot_back_color"
android:layout_gravity="center" android:layout_gravity="center"
android:onClick="singup_click" android:onClick="singup_click"
android:layout_marginTop="20dp" android:layout_marginTop="20dp"
......
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_gravity="start"
android:layout_margin="5dp"
android:elevation="8dp"
app:cardBackgroundColor="@color/bot_back_color"
app:cardCornerRadius="8dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:src="@drawable/ic_robot_svgrepo_com"
android:layout_margin="10dp"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/idTVBot"
android:text="Bot Message"
android:textColor="@color/white"
android:padding="3dp"
android:layout_margin="5dp"
android:layout_gravity="center"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@drawable/background" xmlns:app="http://schemas.android.com/apk/res-auto"
android:textAlignment="center" android:textAlignment="center"
android:id="@+id/cameraFrg"
android:background="@color/back_color"
tools:context=".CameraFragment"> tools:context=".CameraFragment">
<!-- TODO: Update blank fragment layout --> <ImageView
<TextView android:id="@+id/displayImageView"
android:textSize="30dp" android:layout_width="325dp"
android:textColor="@color/white" android:layout_height="309dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.09"
app:srcCompat="@drawable/ic_user_svgrepo_com" />
<Button
android:id="@+id/getPerdict"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="Process"
android:textColor="@color/bot_back_color"
app:layout_constraintBottom_toBottomOf="@+id/galleryBtn"
app:layout_constraintStart_toEndOf="@+id/galleryBtn"
app:layout_constraintTop_toTopOf="@+id/galleryBtn"
app:layout_constraintVertical_bias="0.0" />
<Button
android:id="@+id/cameraBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:textColor="@color/bot_back_color"
android:text="Camera"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.14"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/displayImageView" />
<Button
android:id="@+id/galleryBtn"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_centerInParent="true"
android:textAlignment="center"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_marginStart="16dp"
android:text="Open Camera" /> android:textColor="@color/bot_back_color"
android:text="Gallery"
app:layout_constraintBottom_toBottomOf="@+id/cameraBtn"
app:layout_constraintStart_toEndOf="@+id/cameraBtn"
app:layout_constraintTop_toTopOf="@+id/cameraBtn"
app:layout_constraintVertical_bias="0.0" />
<LinearLayout
android:layout_width="347dp"
android:layout_height="179dp"
android:layout_marginTop="24dp"
android:background="@color/white"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="@+id/getPerdict"
app:layout_constraintStart_toStartOf="@+id/cameraBtn"
app:layout_constraintTop_toBottomOf="@+id/getPerdict">
<TextView
android:id="@+id/deas_Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginBottom="5dp"
android:background="@color/user_back_color"
android:text="Title"
android:textAlignment="center"
android:textColor="#1A237E"
android:textSize="21sp" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/deasis_disc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Description"
android:textColor="@color/bot_back_color" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</FrameLayout> </androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:textAlignment="center" android:textAlignment="center"
android:background="@drawable/background" android:id="@+id/chatfrg"
android:background="@color/back_color"
tools:context=".ChatFragment"> tools:context=".ChatFragment">
<!-- TODO: Update blank fragment layout --> <androidx.recyclerview.widget.RecyclerView
<TextView android:id="@+id/reChatView"
android:textSize="30dp" android:layout_width="match_parent"
android:textColor="@color/white" android:layout_height="match_parent"
android:layout_width="wrap_content" android:layout_above="@+id/idRLmsg"
android:layout_centerInParent="true" android:layout_marginBottom="2dp" />
android:textAlignment="center"
<RelativeLayout
android:id="@+id/idRLmsg"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_alignParentBottom="true"
android:text="Chat Now" /> android:layout_marginBottom="70dp">
<EditText
android:id="@+id/msgEt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="3dp"
android:layout_marginTop="3dp"
android:layout_marginEnd="3dp"
android:layout_marginBottom="3dp"
android:layout_toLeftOf="@id/idFBASend"
android:hint="Enter Message"
android:textColor="@color/white"
android:textColorHint="@color/white" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/idFBASend"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_margin="4dp"
android:backgroundTint="@color/fab_color"
android:src="@drawable/ic_baseline_send_24"
app:fabCustomSize="45dp"
app:tint="@color/white" />
</RelativeLayout>
</FrameLayout> </RelativeLayout>
\ No newline at end of file \ 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"
android:layout_width="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_gravity="end"
android:layout_margin="5dp"
app:cardBackgroundColor="@color/user_back_color"
android:elevation="8dp"
app:cardCornerRadius="8dp"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="User Message"
android:id="@+id/idTvUser"
android:textColor="@color/white"
android:layout_gravity="center"
android:layout_margin="5dp"
android:padding="3dp"/>
<ImageView
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_margin="10dp"
android:src="@drawable/ic_user_svgrepo_com"/>
</LinearLayout>
</androidx.cardview.widget.CardView>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" /> <background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@mipmap/ic_launcher_round"/>
</adaptive-icon> </adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" /> <background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground" /> <foreground android:drawable="@mipmap/ic_launcher_round"/>
</adaptive-icon> </adaptive-icon>
\ No newline at end of file
...@@ -9,4 +9,9 @@ ...@@ -9,4 +9,9 @@
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>
<color name="navBarColor">#F9CC9F</color> <color name="navBarColor">#F9CC9F</color>
<color name="navBarColorSelected">#EB8560</color> <color name="navBarColorSelected">#EB8560</color>
<color name="back_color">#13253D</color>
<color name="bot_back_color">#203757</color>
<color name="user_back_color">#6965FF</color>
<color name="fab_color">#6B6AFF</color>
</resources> </resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path
name="external"
path="." />
<external-files-path
name="external_files"
path="." />
<cache-path
name="cache"
path="." />
<external-cache-path
name="external_cache"
path="." />
<files-path
name="files"
path="." />
</paths>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">10.0.2.2</domain>
</domain-config>
</network-security-config>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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