,
This commit is contained in:
12
.idea/deploymentTargetDropDown.xml
generated
12
.idea/deploymentTargetDropDown.xml
generated
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<targetSelectedWithDropDown>
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
<type value="RUNNING_DEVICE_TARGET" />
|
||||
<deviceKey>
|
||||
<Key>
|
||||
<type value="VIRTUAL_DEVICE_PATH" />
|
||||
<value value="$USER_HOME$/.android/avd/Pixel_7_Pro_API_33.avd" />
|
||||
<type value="SERIAL_NUMBER" />
|
||||
<value value="RZCW41EJRPN" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-11-20T12:11:11.626003Z" />
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-11-21T15:39:20.583874Z" />
|
||||
<targetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
|
||||
@@ -7,13 +7,9 @@
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
|
||||
|
||||
<!-- For app blocking -> open new window over other apps to deny access-->
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
|
||||
<!-- permissions for app blocking -->
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- For app blocking -> open new window over other apps to deny access -->
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- permissions for app blocking -->
|
||||
<uses-permission
|
||||
android:name="android.permission.PACKAGE_USAGE_STATS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
@@ -30,19 +26,28 @@
|
||||
android:allowBackup="false"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.SimpliTend"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:targetApi="31">
|
||||
|
||||
<activity
|
||||
android:name=".chats.ChatsActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".apputils.BottomNotificationActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/BottomNotification" />
|
||||
<activity
|
||||
android:name=".patient_dashboard.NotificationsActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".patient_dashboard.PatSettingsActivity"
|
||||
android:exported="false"
|
||||
@@ -50,8 +55,7 @@
|
||||
<activity
|
||||
android:name=".patient_dashboard.fragments.CallsActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait">
|
||||
</activity>
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".patient_dashboard.DirectionToHomeActivity"
|
||||
android:exported="false"
|
||||
@@ -104,8 +108,7 @@
|
||||
<activity
|
||||
android:name=".caregiverdashboard.activities.CgProfileProgressActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name=".cg_geofencing.CgGeoFencingActivity"
|
||||
android:exported="false"
|
||||
@@ -133,7 +136,7 @@
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<!-- cannot handle DIAL_ACTION-->
|
||||
<!-- cannot handle DIAL_ACTION -->
|
||||
<data android:scheme="no_scheme" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
@@ -141,6 +144,7 @@
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
@@ -154,7 +158,6 @@
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<action android:name="android.intent.action.DIAL" />
|
||||
@@ -162,7 +165,7 @@
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
|
||||
<!-- cannot handle DIAL_ACTION-->
|
||||
<!-- cannot handle DIAL_ACTION -->
|
||||
<data android:scheme="no_scheme" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
@@ -190,12 +193,12 @@
|
||||
<meta-data
|
||||
android:name="android.app.lib_name"
|
||||
android:value="" />
|
||||
</activity>
|
||||
<!-- // app blocking stuff -->
|
||||
</activity> <!-- // app blocking stuff -->
|
||||
<activity android:name=".appblocking.FUAActivity" />
|
||||
<activity android:name=".appblocking.BlockApp"
|
||||
android:launchMode="singleTop"
|
||||
android:exported="true"/>
|
||||
<activity
|
||||
android:name=".appblocking.BlockApp"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.onesignal.NotificationServiceExtension"
|
||||
@@ -213,7 +216,6 @@
|
||||
android:name="android.accessibilityservice"
|
||||
android:resource="@xml/accessibility_service_config" />
|
||||
</service>
|
||||
|
||||
<service
|
||||
android:name=".callwhitelisting.CallService"
|
||||
android:exported="true"
|
||||
@@ -222,12 +224,12 @@
|
||||
<action android:name="android.telecom.CallScreeningService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<service android:name=".locationupdates.LocationService"
|
||||
android:foregroundServiceType="location"/>
|
||||
<service
|
||||
android:name=".locationupdates.LocationService"
|
||||
android:foregroundServiceType="location" />
|
||||
|
||||
<receiver android:name=".patientgeofencing.GeoFenceBroadcastReceiver" />
|
||||
<receiver android:name=".patientgeofencing.PatientLocationUpdatesReceiver"/>
|
||||
<receiver android:name=".patientgeofencing.PatientLocationUpdatesReceiver" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
@@ -238,7 +240,6 @@
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -305,9 +305,9 @@ public abstract class AppUtil {
|
||||
return returnString.toString();
|
||||
}
|
||||
|
||||
public static String formatDate(@NonNull String fromFormat,
|
||||
@NonNull String toFormat,
|
||||
String fromDate){
|
||||
public static String formatDate(@NonNull String fromFormat, // mm-dd-yyyy
|
||||
@NonNull String toFormat, // yyyy-mm-dd
|
||||
String fromDate){ // 09-02-2001
|
||||
|
||||
try {
|
||||
SimpleDateFormat fromSdf = new SimpleDateFormat(fromFormat, Locale.getDefault());
|
||||
@@ -355,257 +355,6 @@ public abstract class AppUtil {
|
||||
if (activity != null) activity.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void showBottomAlert(Context context,
|
||||
String patient_name,
|
||||
@Nullable String content_type, Intent intent,
|
||||
@NonNull View.OnClickListener text_senior_click) throws Exception {
|
||||
|
||||
if (content_type == null) return;
|
||||
|
||||
BottomSheetDialog bsd = new BottomSheetDialog(context, R.style.BottomSheetDialog);
|
||||
BottomSheetAlertBinding binding = BottomSheetAlertBinding.inflate(LayoutInflater.from(context));
|
||||
bsd.setContentView(binding.getRoot());
|
||||
|
||||
binding.close.setOnClickListener(v -> bsd.dismiss());
|
||||
|
||||
String title = intent.getStringExtra(NotificationService.NOTIFICATION_TITLE_KEY);
|
||||
String body = intent.getStringExtra(NotificationService.NOTIFICATION_BODY_KEY);
|
||||
|
||||
switch (content_type) {
|
||||
case Constants.PATIENT_OUT_OF_GEOFENCE:
|
||||
|
||||
if (!getCgNotificationPref(context, GEOFENCE_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
title = patient_name + " is outside of geofence zone!";
|
||||
String senior_distance = intent.getStringExtra(NOTIFICATION_SENIOR_ADDRESS_KEY);
|
||||
|
||||
try {
|
||||
double distance = Double.parseDouble(senior_distance);
|
||||
if (distance == 0) throw new Exception();
|
||||
|
||||
senior_distance = distance + " miles away from home";
|
||||
}catch (Exception e){
|
||||
senior_distance = "Unable to locate";
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_medication_time,
|
||||
title, "Current location",
|
||||
senior_distance, "Call senior",
|
||||
v -> {
|
||||
CaregiverDataCache.getCaregiverData(context, (careGiverData -> {
|
||||
bsd.dismiss();
|
||||
if (careGiverData == null || careGiverData.patientDetails == null) {
|
||||
Toast.makeText(context, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
AppUtil.dialPhone(context, careGiverData.patientDetails.phone_number);
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.ACTIVITY_TIME:
|
||||
|
||||
if (!getCgNotificationPref(context, ACTIVITY_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
String routine_description = null;
|
||||
try {
|
||||
RoutineDetails routine = (RoutineDetails) intent.getSerializableExtra(ACTIVITY_EXTRA_KEY);
|
||||
if (routine != null) {
|
||||
title = "Remind " + patient_name;
|
||||
|
||||
String start_time, end_time;
|
||||
try {
|
||||
SimpleDateFormat input_sdf = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
|
||||
SimpleDateFormat output_sdf = new SimpleDateFormat("hh:mm a", Locale.getDefault());
|
||||
|
||||
Date start_date = input_sdf.parse(routine.routine_start_time);
|
||||
Date end_date = input_sdf.parse(routine.routine_end_time);
|
||||
|
||||
start_time = output_sdf.format(Objects.requireNonNull(start_date));
|
||||
end_time = output_sdf.format(Objects.requireNonNull(end_date));
|
||||
} catch (Exception e) {
|
||||
start_time = routine.routine_start_time;
|
||||
end_time = routine.routine_end_time;
|
||||
}
|
||||
|
||||
body = routine.routine_title;
|
||||
|
||||
routine_description = start_time + " - " + end_time;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_activity_time,
|
||||
title, body,
|
||||
routine_description, "Text senior", view -> {
|
||||
bsd.dismiss();
|
||||
text_senior_click.onClick(null);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.MEDICINE_TIME:
|
||||
|
||||
if (!getCgNotificationPref(context, MEDICATIONS_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
String description = null;
|
||||
|
||||
try {
|
||||
ReminderResult reminder = (ReminderResult) intent.getSerializableExtra(REMINDER_EXTRA_KEY);
|
||||
if (reminder != null) {
|
||||
title = "It's time for " + patient_name + "'s medicines";
|
||||
|
||||
body = "Medication Reminder:\n" + reminder.medicine_name + "\n" + reminder.medication_quantity;
|
||||
try {
|
||||
body += " " + reminder.medication_type.get(0).title;
|
||||
}catch (Exception e){
|
||||
// do nothing
|
||||
body += " unit";
|
||||
}
|
||||
|
||||
if (reminder.medication_instruction == null) reminder.medication_instruction = "None";
|
||||
description = "Instructions: " + reminder.medication_instruction;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_medication_time,
|
||||
title, body,
|
||||
description, "Text senior", view -> {
|
||||
bsd.dismiss();
|
||||
text_senior_click.onClick(null);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.PATIENT_REQUESTED_DIRECTION:
|
||||
|
||||
if (!getCgNotificationPref(context, DIRECTIONS_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
title = patient_name + " requested for directions to home";
|
||||
body = "Current location:";
|
||||
String doh_distance = intent.getStringExtra(NOTIFICATION_SENIOR_ADDRESS_KEY);
|
||||
|
||||
try {
|
||||
double distance = Double.parseDouble(doh_distance);
|
||||
if (distance == 0) throw new Exception();
|
||||
|
||||
doh_distance = distance + " miles away from home";
|
||||
}catch (Exception e){
|
||||
doh_distance = "Unable to locate";
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_directioin_requested,
|
||||
title, body,
|
||||
doh_distance, "Call senior",
|
||||
v -> {
|
||||
CaregiverDataCache.getCaregiverData(context, (careGiverData -> {
|
||||
bsd.dismiss();
|
||||
if (careGiverData == null || careGiverData.patientDetails == null) {
|
||||
Toast.makeText(context, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
AppUtil.dialPhone(context, careGiverData.patientDetails.phone_number);
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.PATIENT_REQUESTED_SOS:
|
||||
|
||||
if (!getCgNotificationPref(context, SOS_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
title = patient_name + " called the emergency number";
|
||||
body = "Please contact " + patient_name;
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_sos_requested,
|
||||
title, body,
|
||||
null, "Call senior",
|
||||
v -> {
|
||||
CaregiverDataCache.getCaregiverData(context, (careGiverData -> {
|
||||
bsd.dismiss();
|
||||
if (careGiverData == null || careGiverData.patientDetails == null) {
|
||||
Toast.makeText(context, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
AppUtil.dialPhone(context, careGiverData.patientDetails.phone_number);
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case MEDICATION_REFILL:
|
||||
|
||||
if (!getCgNotificationPref(context, MEDICATION_REFILL_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
String refill_description = null;
|
||||
|
||||
title = "Medicines refill";
|
||||
|
||||
try {
|
||||
ReminderResult reminder = (ReminderResult) intent.getSerializableExtra(REMINDER_EXTRA_KEY);
|
||||
if (reminder != null) {
|
||||
|
||||
body = reminder.medicine_name + " (" + reminder.dosage + " " + reminder.dosage_unit + ")";
|
||||
|
||||
if (reminder.medication_instruction == null) reminder.medication_instruction = "None";
|
||||
refill_description = "Quantity to be refilled: " + reminder.medication_quantity;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_med_refill,
|
||||
title, body,
|
||||
refill_description, "Text senior", view -> {
|
||||
// bsd.dismiss();
|
||||
// text_senior_click.onClick(null);
|
||||
|
||||
CaregiverDataCache.getCaregiverData(context,
|
||||
(careGiverData -> {
|
||||
if (careGiverData != null && careGiverData.patientDetails != null){
|
||||
AppUtil.messageNumber(context, careGiverData.patientDetails.phone_number);
|
||||
}
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
}
|
||||
|
||||
// already returning
|
||||
}
|
||||
|
||||
public static String getCompleteAddress(Context context, double LATITUDE, double LONGITUDE) {
|
||||
String strAdd = null;
|
||||
Geocoder geocoder = new Geocoder(context, Locale.getDefault());
|
||||
@@ -627,19 +376,6 @@ public abstract class AppUtil {
|
||||
return strAdd;
|
||||
}
|
||||
|
||||
private static void setupBottomSheet(BottomSheetAlertBinding binding,
|
||||
int img_res,
|
||||
String title, String description_title,
|
||||
String description, String btn_text,
|
||||
View.OnClickListener btn_clickListener) {
|
||||
binding.image.setImageResource(img_res);
|
||||
binding.title.setText(title);
|
||||
binding.descriptionTitle.setText(description_title);
|
||||
binding.description.setText(description);
|
||||
binding.btn.setText(btn_text);
|
||||
binding.btn.setOnClickListener(btn_clickListener);
|
||||
}
|
||||
|
||||
public static void openLink(Activity activity,
|
||||
@NonNull String link, @NonNull String title){
|
||||
try {
|
||||
|
||||
@@ -0,0 +1,375 @@
|
||||
package com.app.simplitend.apputils;
|
||||
|
||||
import static com.app.simplitend.apputils.AppUtil.ACTIVITY_NOTIFICATIONS;
|
||||
import static com.app.simplitend.apputils.AppUtil.DIRECTIONS_NOTIFICATIONS;
|
||||
import static com.app.simplitend.apputils.AppUtil.GEOFENCE_NOTIFICATIONS;
|
||||
import static com.app.simplitend.apputils.AppUtil.MEDICATIONS_NOTIFICATIONS;
|
||||
import static com.app.simplitend.apputils.AppUtil.MEDICATION_REFILL_NOTIFICATIONS;
|
||||
import static com.app.simplitend.apputils.AppUtil.SOS_NOTIFICATIONS;
|
||||
import static com.app.simplitend.apputils.AppUtil.getCgNotificationPref;
|
||||
import static com.app.simplitend.apputils.Constants.ACTIVITY_EXTRA_KEY;
|
||||
import static com.app.simplitend.apputils.Constants.MEDICATION_REFILL;
|
||||
import static com.app.simplitend.apputils.Constants.REMINDER_EXTRA_KEY;
|
||||
import static com.app.simplitend.apputils.NotificationService.CONTENT_TYPE_KEY;
|
||||
import static com.app.simplitend.apputils.NotificationService.NOTIFICATION_CONTENT_ID_KEY;
|
||||
import static com.app.simplitend.apputils.NotificationService.NOTIFICATION_SENIOR_ADDRESS_KEY;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.CaregiverMainViewModel;
|
||||
import com.app.simplitend.chats.ChatsActivity;
|
||||
import com.app.simplitend.databinding.BottomSheetAlertBinding;
|
||||
import com.app.simplitend.patientprofile.medreminder.mvvm.models.ReminderResult;
|
||||
import com.app.simplitend.patientprofile.setuproutine.mvvm.RoutineDetails;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
public class BottomNotificationActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_bottom_notification);
|
||||
if (AppUtil.getCgToken(this) == null){
|
||||
// no caregiver is logged in
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
||||
View view = findViewById(R.id.bsa_tint);
|
||||
if (view != null){
|
||||
view.setOnClickListener(v -> {
|
||||
finish();
|
||||
});
|
||||
}
|
||||
|
||||
Intent intent = getIntent();
|
||||
|
||||
String content_type = intent.getStringExtra(CONTENT_TYPE_KEY);
|
||||
int id = intent.getIntExtra(NOTIFICATION_CONTENT_ID_KEY, -1);
|
||||
|
||||
if (id != -1) {
|
||||
if (Constants.ACTIVITY_TIME.equals(content_type) && CaregiverMainViewModel.activityList != null) {
|
||||
for (RoutineDetails routine : CaregiverMainViewModel.activityList) {
|
||||
if (id == routine.id) {
|
||||
intent.putExtra(Constants.ACTIVITY_EXTRA_KEY, routine);
|
||||
}
|
||||
}
|
||||
} else if (Constants.MEDICINE_TIME.equals(content_type) && CaregiverMainViewModel.remindersList != null) {
|
||||
for (ReminderResult reminder : CaregiverMainViewModel.remindersList) {
|
||||
if (id == reminder.id) {
|
||||
intent.putExtra(Constants.REMINDER_EXTRA_KEY, reminder);
|
||||
}
|
||||
}
|
||||
} else if (Constants.MEDICATION_REFILL.equals(content_type) && CaregiverMainViewModel.remindersList != null) {
|
||||
for (ReminderResult reminder : CaregiverMainViewModel.remindersList) {
|
||||
if (id == reminder.id) {
|
||||
intent.putExtra(Constants.REMINDER_EXTRA_KEY, reminder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CaregiverDataCache.getCaregiverData(this, careGiverData -> {
|
||||
String patient_name = null;
|
||||
if (careGiverData != null && careGiverData.patientDetails != null) {
|
||||
patient_name = careGiverData.patientDetails.first_name;
|
||||
} else {
|
||||
patient_name = "Your loved one";
|
||||
}
|
||||
|
||||
try {
|
||||
showBottomAlert(this,
|
||||
patient_name,
|
||||
content_type,
|
||||
intent);
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
}, false);
|
||||
}
|
||||
|
||||
public void showBottomAlert(Context context,
|
||||
String patient_name,
|
||||
@Nullable String content_type, Intent intent) throws Exception {
|
||||
|
||||
if (content_type == null) return;
|
||||
|
||||
BottomSheetDialog bsd = new BottomSheetDialog(context, R.style.BottomSheetDialog);
|
||||
BottomSheetAlertBinding binding = BottomSheetAlertBinding.inflate(LayoutInflater.from(context));
|
||||
bsd.setContentView(binding.getRoot());
|
||||
|
||||
bsd.setOnDismissListener(dialogInterface -> {
|
||||
BottomNotificationActivity.this.finish();
|
||||
});
|
||||
|
||||
binding.close.setOnClickListener(v -> bsd.dismiss());
|
||||
|
||||
String title = intent.getStringExtra(NotificationService.NOTIFICATION_TITLE_KEY);
|
||||
String body = intent.getStringExtra(NotificationService.NOTIFICATION_BODY_KEY);
|
||||
|
||||
switch (content_type) {
|
||||
case Constants.PATIENT_OUT_OF_GEOFENCE:
|
||||
|
||||
if (!getCgNotificationPref(context, GEOFENCE_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
title = patient_name + " is outside of geofence zone!";
|
||||
String senior_distance = intent.getStringExtra(NOTIFICATION_SENIOR_ADDRESS_KEY);
|
||||
|
||||
try {
|
||||
double distance = Double.parseDouble(senior_distance);
|
||||
if (distance == 0) throw new Exception();
|
||||
|
||||
senior_distance = distance + " miles away from home";
|
||||
}catch (Exception e){
|
||||
senior_distance = "Unable to locate";
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_medication_time,
|
||||
title, "Current location",
|
||||
senior_distance, "Call senior",
|
||||
v -> {
|
||||
CaregiverDataCache.getCaregiverData(context, (careGiverData -> {
|
||||
bsd.dismiss();
|
||||
if (careGiverData == null || careGiverData.patientDetails == null) {
|
||||
Toast.makeText(context, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
AppUtil.dialPhone(context, careGiverData.patientDetails.phone_number);
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.ACTIVITY_TIME:
|
||||
|
||||
if (!getCgNotificationPref(context, ACTIVITY_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
String routine_description = null;
|
||||
try {
|
||||
RoutineDetails routine = (RoutineDetails) intent.getSerializableExtra(ACTIVITY_EXTRA_KEY);
|
||||
if (routine != null) {
|
||||
title = "Remind " + patient_name;
|
||||
|
||||
String start_time, end_time;
|
||||
try {
|
||||
SimpleDateFormat input_sdf = new SimpleDateFormat("HH:mm:ss", Locale.getDefault());
|
||||
SimpleDateFormat output_sdf = new SimpleDateFormat("hh:mm a", Locale.getDefault());
|
||||
|
||||
Date start_date = input_sdf.parse(routine.routine_start_time);
|
||||
Date end_date = input_sdf.parse(routine.routine_end_time);
|
||||
|
||||
start_time = output_sdf.format(Objects.requireNonNull(start_date));
|
||||
end_time = output_sdf.format(Objects.requireNonNull(end_date));
|
||||
} catch (Exception e) {
|
||||
start_time = routine.routine_start_time;
|
||||
end_time = routine.routine_end_time;
|
||||
}
|
||||
|
||||
body = routine.routine_title;
|
||||
|
||||
routine_description = start_time + " - " + end_time;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_activity_time,
|
||||
title, body,
|
||||
routine_description, "Text senior", view -> {
|
||||
bsd.dismiss();
|
||||
finish();
|
||||
Intent chatsIntent = new Intent(this, ChatsActivity.class);
|
||||
startActivity(chatsIntent);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.MEDICINE_TIME:
|
||||
|
||||
if (!getCgNotificationPref(context, MEDICATIONS_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
String description = null;
|
||||
|
||||
try {
|
||||
ReminderResult reminder = (ReminderResult) intent.getSerializableExtra(REMINDER_EXTRA_KEY);
|
||||
if (reminder != null) {
|
||||
title = "It's time for " + patient_name + "'s medicines";
|
||||
|
||||
body = "Medication Reminder:\n" + reminder.medicine_name + "\n" + reminder.medication_quantity;
|
||||
try {
|
||||
body += " " + reminder.medication_type.get(0).title;
|
||||
}catch (Exception e){
|
||||
// do nothing
|
||||
body += " unit";
|
||||
}
|
||||
|
||||
if (reminder.medication_instruction == null) reminder.medication_instruction = "None";
|
||||
description = "Instructions: " + reminder.medication_instruction;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_medication_time,
|
||||
title, body,
|
||||
description, "Text senior", view -> {
|
||||
bsd.dismiss();
|
||||
finish();
|
||||
Intent chatsIntent = new Intent(this, ChatsActivity.class);
|
||||
startActivity(chatsIntent);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.PATIENT_REQUESTED_DIRECTION:
|
||||
|
||||
if (!getCgNotificationPref(context, DIRECTIONS_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
title = patient_name + " requested for directions to home";
|
||||
body = "Current location:";
|
||||
String doh_distance = intent.getStringExtra(NOTIFICATION_SENIOR_ADDRESS_KEY);
|
||||
|
||||
try {
|
||||
double distance = Double.parseDouble(doh_distance);
|
||||
if (distance == 0) throw new Exception();
|
||||
|
||||
doh_distance = distance + " miles away from home";
|
||||
}catch (Exception e){
|
||||
doh_distance = "Unable to locate";
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_directioin_requested,
|
||||
title, body,
|
||||
doh_distance, "Call senior",
|
||||
v -> {
|
||||
CaregiverDataCache.getCaregiverData(context, (careGiverData -> {
|
||||
bsd.dismiss();
|
||||
if (careGiverData == null || careGiverData.patientDetails == null) {
|
||||
Toast.makeText(context, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
AppUtil.dialPhone(context, careGiverData.patientDetails.phone_number);
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case Constants.PATIENT_REQUESTED_SOS:
|
||||
|
||||
if (!getCgNotificationPref(context, SOS_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
title = patient_name + " called the emergency number";
|
||||
body = "Please contact " + patient_name;
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_sos_requested,
|
||||
title, body,
|
||||
null, "Call senior",
|
||||
v -> {
|
||||
CaregiverDataCache.getCaregiverData(context, (careGiverData -> {
|
||||
bsd.dismiss();
|
||||
if (careGiverData == null || careGiverData.patientDetails == null) {
|
||||
Toast.makeText(context, "Couldn't load data", Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
|
||||
AppUtil.dialPhone(context, careGiverData.patientDetails.phone_number);
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
case MEDICATION_REFILL:
|
||||
|
||||
if (!getCgNotificationPref(context, MEDICATION_REFILL_NOTIFICATIONS)){
|
||||
// notifications are off by user
|
||||
return;
|
||||
}
|
||||
|
||||
String refill_description = null;
|
||||
|
||||
title = "Medicines refill";
|
||||
|
||||
try {
|
||||
ReminderResult reminder = (ReminderResult) intent.getSerializableExtra(REMINDER_EXTRA_KEY);
|
||||
if (reminder != null) {
|
||||
|
||||
body = reminder.medicine_name + " (" + reminder.dosage + " " + reminder.dosage_unit + ")";
|
||||
|
||||
if (reminder.medication_instruction == null) reminder.medication_instruction = "None";
|
||||
refill_description = "Quantity to be refilled: " + reminder.medication_quantity;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
setupBottomSheet(binding,
|
||||
R.drawable.img_med_refill,
|
||||
title, body,
|
||||
refill_description, "Text senior", view -> {
|
||||
// bsd.dismiss();
|
||||
// text_senior_click.onClick(null);
|
||||
|
||||
CaregiverDataCache.getCaregiverData(context,
|
||||
(careGiverData -> {
|
||||
if (careGiverData != null && careGiverData.patientDetails != null){
|
||||
AppUtil.messageNumber(context, careGiverData.patientDetails.phone_number);
|
||||
}
|
||||
}), true);
|
||||
});
|
||||
|
||||
bsd.show();
|
||||
break;
|
||||
}
|
||||
|
||||
// already returning
|
||||
}
|
||||
|
||||
private void setupBottomSheet(BottomSheetAlertBinding binding,
|
||||
int img_res,
|
||||
String title, String description_title,
|
||||
String description, String btn_text,
|
||||
View.OnClickListener btn_clickListener) {
|
||||
binding.image.setImageResource(img_res);
|
||||
binding.title.setText(title);
|
||||
binding.descriptionTitle.setText(description_title);
|
||||
binding.description.setText(description);
|
||||
binding.btn.setText(btn_text);
|
||||
binding.btn.setOnClickListener(btn_clickListener);
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ public abstract class Constants {
|
||||
public static final String PATIENT_OUT_OF_GEOFENCE = "patient_outof_geofence";
|
||||
public static final String PATIENT_REQUESTED_DIRECTION = "patient_requested_help";
|
||||
public static final String PATIENT_REQUESTED_SOS = "patient_sos_clicked";
|
||||
public static final String CHATS_NOTIFICATIONS = "chat_notification";
|
||||
public static final String REMINDER_EXTRA_KEY = "reminder_extra_key";
|
||||
public static final String ACTIVITY_EXTRA_KEY = "activity_extra_key";
|
||||
|
||||
|
||||
@@ -2,32 +2,15 @@ package com.app.simplitend.apputils;
|
||||
|
||||
import static com.app.simplitend.locationupdates.LocationService.LOCATION_NOTIFICATION_CHANNEL_ID;
|
||||
|
||||
import android.app.ActivityManager;
|
||||
import android.app.Application;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.MediaStore;
|
||||
import android.provider.Telephony;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.app.simplitend.patient_dashboard.chats.SocketHelper;
|
||||
import com.onesignal.Continue;
|
||||
import com.onesignal.OneSignal;
|
||||
import com.onesignal.debug.LogLevel;
|
||||
import com.app.simplitend.R;
|
||||
import com.onesignal.notifications.INotificationClickEvent;
|
||||
import com.onesignal.notifications.INotificationClickListener;
|
||||
import com.stripe.android.PaymentConfiguration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SimpliTendApp extends Application {
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
package com.app.simplitend.caregiverdashboard.activities;
|
||||
|
||||
import static com.app.simplitend.apputils.NotificationService.CONTENT_TYPE_KEY;
|
||||
import static com.app.simplitend.apputils.NotificationService.NOTIFICATION_CONTENT_ID_KEY;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
@@ -16,12 +11,9 @@ import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.app.simplitend.patient_dashboard.chats.SocketHelper;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.CaregiverDataCache;
|
||||
import com.app.simplitend.apputils.Constants;
|
||||
import com.app.simplitend.articles.ArticlesActivity;
|
||||
import com.app.simplitend.caregiverdashboard.fragments.CgDashBoardFragment;
|
||||
import com.app.simplitend.caregiverdashboard.fragments.MyPatientFragment;
|
||||
@@ -32,10 +24,10 @@ import com.app.simplitend.customsviews.MenuItem;
|
||||
import com.app.simplitend.databinding.CaregiverDashboardActivityBinding;
|
||||
import com.app.simplitend.databinding.CaregiverDashboardMenuBinding;
|
||||
import com.app.simplitend.faqs.FAQ_Activity;
|
||||
import com.app.simplitend.patient_dashboard.chats.ChatFragment;
|
||||
import com.app.simplitend.patientprofile.medreminder.mvvm.models.ReminderResult;
|
||||
import com.app.simplitend.patientprofile.setuproutine.mvvm.RoutineDetails;
|
||||
import com.app.simplitend.chats.ChatFragment;
|
||||
import com.app.simplitend.chats.SocketHelper;
|
||||
import com.app.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.yarolegovich.slidingrootnav.SlidingRootNavBuilder;
|
||||
import com.yarolegovich.slidingrootnav.callback.DragStateListener;
|
||||
|
||||
@@ -48,7 +40,6 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
private CaregiverDashboardMenuBinding menuBinding;
|
||||
protected CaregiverMainViewModel viewModel;
|
||||
private CareGiverData careGiverData;
|
||||
private BroadcastReceiver notification_receiver;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -65,61 +56,6 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
|
||||
watchSubscription();
|
||||
}, true);
|
||||
|
||||
// NOTIFICATION RECEIVER
|
||||
notification_receiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
String content_type = intent.getStringExtra(CONTENT_TYPE_KEY);
|
||||
int id = intent.getIntExtra(NOTIFICATION_CONTENT_ID_KEY, -1);
|
||||
|
||||
if (id != -1){
|
||||
if (Constants.ACTIVITY_TIME.equals(content_type) && viewModel.activityList != null){
|
||||
for (RoutineDetails routine: viewModel.activityList){
|
||||
if (id == routine.id){
|
||||
intent.putExtra(Constants.ACTIVITY_EXTRA_KEY, routine);
|
||||
}
|
||||
}
|
||||
}else if (Constants.MEDICINE_TIME.equals(content_type) && viewModel.remindersList != null){
|
||||
for (ReminderResult reminder: viewModel.remindersList){
|
||||
if (id == reminder.id){
|
||||
intent.putExtra(Constants.REMINDER_EXTRA_KEY, reminder);
|
||||
}
|
||||
}
|
||||
}else if (Constants.MEDICATION_REFILL.equals(content_type) && viewModel.remindersList != null){
|
||||
for (ReminderResult reminder: viewModel.remindersList){
|
||||
if (id == reminder.id){
|
||||
intent.putExtra(Constants.REMINDER_EXTRA_KEY, reminder);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
String patient_name;
|
||||
if (careGiverData != null && careGiverData.patientDetails != null){
|
||||
patient_name = careGiverData.patientDetails.first_name;
|
||||
}else{
|
||||
patient_name = "Your loved one";
|
||||
}
|
||||
|
||||
AppUtil.showBottomAlert(CaregiverDashActivity.this,
|
||||
patient_name,
|
||||
content_type,
|
||||
intent,
|
||||
v -> {
|
||||
// here v is null
|
||||
binding.bottomNav.selectMenuItem(MenuItem.CHATS);
|
||||
onBottomNavItemSelected(MenuItem.CHATS);
|
||||
});
|
||||
}catch (Exception e){
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
registerReceiver(notification_receiver, new IntentFilter(AppUtil.NOTIFICATION_ACTION));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -158,7 +94,6 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
unregisterReceiver(notification_receiver);
|
||||
SocketHelper.getInstance().closeConnection();
|
||||
}
|
||||
|
||||
@@ -369,6 +304,7 @@ public class CaregiverDashActivity extends AppCompatActivity implements
|
||||
careGiverData1.caregiver_xid + "",
|
||||
careGiverData1.patientId + "",
|
||||
careGiverData1.link_id,
|
||||
careGiverData1.patientDetails.id + "",
|
||||
careGiverData1.first_name,
|
||||
careGiverData1.patientDetails.first_name,
|
||||
sender_image,
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.app.simplitend.caregiverdashboard.mvvm.CgHomeContracts;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.models.GeoFenceDetails;
|
||||
import com.app.simplitend.databinding.ActivityCgGeofencingBinding;
|
||||
import com.app.simplitend.databinding.GeofenceBottomSheetBinding;
|
||||
import com.app.simplitend.patient_dashboard.chats.SocketHelper;
|
||||
import com.app.simplitend.chats.SocketHelper;
|
||||
import com.app.simplitend.welcome.welcomecg.mvvm.CareGiverData;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
import com.google.android.gms.maps.CameraUpdateFactory;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats;
|
||||
package com.app.simplitend.chats;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@@ -16,18 +16,23 @@ import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.Constants;
|
||||
import com.app.simplitend.chats.mvvm.Author;
|
||||
import com.app.simplitend.chats.mvvm.ChatViewModel;
|
||||
import com.app.simplitend.chats.mvvm.Message;
|
||||
import com.app.simplitend.chats.mvvm.Receiver;
|
||||
import com.app.simplitend.chats.mvvm.RemoteMessage;
|
||||
import com.app.simplitend.databinding.ChatFragmentBinding;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Author;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.ChatViewModel;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Message;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Receiver;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.RemoteMessage;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.onesignal.OneSignal;
|
||||
import com.onesignal.notifications.INotificationLifecycleListener;
|
||||
import com.onesignal.notifications.INotificationWillDisplayEvent;
|
||||
import com.stfalcon.chatkit.messages.MessagesListAdapter;
|
||||
import com.stfalcon.chatkit.utils.DateFormatter;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
public class ChatFragment extends Fragment implements SocketHelper.Callback<Message>, ChatViewModel.ChatsCallBack {
|
||||
|
||||
@@ -44,7 +49,7 @@ public class ChatFragment extends Fragment implements SocketHelper.Callback<Mess
|
||||
|
||||
private final String author_image, receiver_image;
|
||||
|
||||
private final String sender_id, receiver_id, channel_id;
|
||||
private final String sender_id, receiver_id, channel_id, user_principal_id;
|
||||
|
||||
public static final String SEND = "Send";
|
||||
|
||||
@@ -63,11 +68,13 @@ public class ChatFragment extends Fragment implements SocketHelper.Callback<Mess
|
||||
this.receiver_name = "NONE";
|
||||
this.author_image = null;
|
||||
this.receiver_image = null;
|
||||
this.user_principal_id = null;
|
||||
}
|
||||
|
||||
public ChatFragment(String sender_id,
|
||||
String receiver_id,
|
||||
String channel_id,
|
||||
String user_principal_id,
|
||||
String nick_name,
|
||||
String receiver_name,
|
||||
String sender_image,
|
||||
@@ -79,6 +86,7 @@ public class ChatFragment extends Fragment implements SocketHelper.Callback<Mess
|
||||
this.receiver_name = receiver_name;
|
||||
this.author_image = sender_image;
|
||||
this.receiver_image = receiver_image;
|
||||
this.user_principal_id = user_principal_id;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -178,7 +186,7 @@ public class ChatFragment extends Fragment implements SocketHelper.Callback<Mess
|
||||
|
||||
if (SocketHelper.getInstance().isConnected()) {
|
||||
SocketHelper.getInstance().sendMessage(binding.messageEt.getText().toString().trim(),
|
||||
sender_id, receiver_id, channel_id);
|
||||
sender_id, receiver_id, channel_id, user_principal_id);
|
||||
binding.messageEt.setText("");
|
||||
enableDenButton(false);
|
||||
} else {
|
||||
@@ -250,6 +258,22 @@ public class ChatFragment extends Fragment implements SocketHelper.Callback<Mess
|
||||
getChats();
|
||||
}
|
||||
});
|
||||
|
||||
OneSignal.getNotifications().addForegroundLifecycleListener(new INotificationLifecycleListener() {
|
||||
@Override
|
||||
public void onWillDisplay(@NonNull INotificationWillDisplayEvent iNotificationWillDisplayEvent) {
|
||||
JSONObject extras = iNotificationWillDisplayEvent.getNotification().getAdditionalData();
|
||||
|
||||
try {
|
||||
if (extras == null) return;
|
||||
if (Constants.CHATS_NOTIFICATIONS.equals(extras.getString("content_type"))){
|
||||
iNotificationWillDisplayEvent.preventDefault();
|
||||
}
|
||||
}catch (Exception e){
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void enableDenButton(boolean enable){
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats;
|
||||
package com.app.simplitend.chats;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.ViewGroup;
|
||||
@@ -8,7 +8,7 @@ import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.ListAdapter;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.ChatItem;
|
||||
import com.app.simplitend.chats.mvvm.ChatItem;
|
||||
import com.app.simplitend.databinding.ChatCardViewholderBinding;
|
||||
|
||||
public class ChatListAdapter extends ListAdapter<ChatItem, ChatListAdapter.ChatCardViewHolder> {
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.app.simplitend.patient_dashboard.chats;
|
||||
package com.app.simplitend.chats;
|
||||
|
||||
import static com.app.simplitend.patient_dashboard.chats.ChatFragment.CHAT_ITEM_KEY;
|
||||
import static com.app.simplitend.chats.ChatFragment.CHAT_ITEM_KEY;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -16,8 +16,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.ChatItem;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.ChatListViewModel;
|
||||
import com.app.simplitend.chats.mvvm.ChatItem;
|
||||
import com.app.simplitend.chats.mvvm.ChatListViewModel;
|
||||
import com.app.simplitend.databinding.ChatListFragmentBinding;
|
||||
|
||||
public class ChatListFragment extends Fragment implements ChatListAdapter.OnChatItemClickListener {
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.app.simplitend.chats;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.CaregiverDataCache;
|
||||
|
||||
public class ChatsActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_chats);
|
||||
|
||||
CaregiverDataCache.getCaregiverData(this, (careGiverData1 -> {
|
||||
if (careGiverData1 != null && careGiverData1.patientDetails != null){
|
||||
|
||||
String sender_image;
|
||||
if (careGiverData1.profile_photo == null){
|
||||
sender_image = String.valueOf(R.drawable.caregiver_img);
|
||||
}else{
|
||||
sender_image = AppUtil.IMAGE_BASE_URL + careGiverData1.profile_photo;
|
||||
}
|
||||
|
||||
String receiver_image;
|
||||
if (careGiverData1.patientDetails.profile_photo == null){
|
||||
receiver_image = String.valueOf(R.drawable.senior_img);
|
||||
}else{
|
||||
receiver_image = AppUtil.IMAGE_BASE_URL + careGiverData1.patientDetails.profile_photo;
|
||||
}
|
||||
|
||||
getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.chats_fcv, new ChatFragment(
|
||||
careGiverData1.caregiver_xid + "",
|
||||
careGiverData1.patientId + "",
|
||||
careGiverData1.link_id,
|
||||
careGiverData1.patientDetails.id + "",
|
||||
careGiverData1.first_name,
|
||||
careGiverData1.patientDetails.first_name,
|
||||
sender_image,
|
||||
receiver_image), "chat")
|
||||
.commitAllowingStateLoss();
|
||||
}else{
|
||||
finish();
|
||||
}
|
||||
}), true);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.app.simplitend.patient_dashboard.chats;
|
||||
package com.app.simplitend.chats;
|
||||
|
||||
import android.graphics.Color;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Message;
|
||||
import com.app.simplitend.chats.mvvm.Message;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.stfalcon.chatkit.messages.MessagesListAdapter;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package com.app.simplitend.patient_dashboard.chats;
|
||||
package com.app.simplitend.chats;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Message;
|
||||
import com.app.simplitend.chats.mvvm.Message;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.stfalcon.chatkit.messages.MessagesListAdapter;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats;
|
||||
package com.app.simplitend.chats;
|
||||
|
||||
import android.location.Location;
|
||||
import android.util.Log;
|
||||
@@ -6,9 +6,9 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Author;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Message;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Receiver;
|
||||
import com.app.simplitend.chats.mvvm.Author;
|
||||
import com.app.simplitend.chats.mvvm.Message;
|
||||
import com.app.simplitend.chats.mvvm.Receiver;
|
||||
|
||||
import io.socket.client.IO;
|
||||
import io.socket.client.Socket;
|
||||
@@ -133,8 +133,8 @@ public class SocketHelper {
|
||||
mSocket.off(channel_id);
|
||||
}
|
||||
|
||||
public void sendMessage(@NonNull String message, @NonNull String sender_id, @NonNull String receiver_id, @NonNull String channel_id) {
|
||||
mSocket.emit("chatMessage", sender_id, message, receiver_id, channel_id);
|
||||
public void sendMessage(@NonNull String message, @NonNull String sender_id, @NonNull String receiver_id, @NonNull String channel_id, String user_principal_id) {
|
||||
mSocket.emit("chatMessage", sender_id, message, receiver_id, channel_id, user_principal_id);
|
||||
}
|
||||
|
||||
private static final String LOCATION_EVENT_PREFIX = "patientCurrentLocation";
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.stfalcon.chatkit.commons.models.IUser;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.app.simplitend.patient_dashboard.chats.ChatListAdapter;
|
||||
import com.app.simplitend.chats.ChatListAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
import com.stfalcon.chatkit.commons.models.IMessage;
|
||||
import com.stfalcon.chatkit.commons.models.IUser;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
import com.stfalcon.chatkit.commons.models.IUser;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.app.simplitend.patient_dashboard.chats.mvvm;
|
||||
package com.app.simplitend.chats.mvvm;
|
||||
|
||||
public class RemoteMessage {
|
||||
public String id;
|
||||
@@ -15,7 +15,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.patient_dashboard.chats.SocketHelper;
|
||||
import com.app.simplitend.chats.SocketHelper;
|
||||
import com.app.simplitend.patientgeofencing.PatientLocationUpdatesReceiver;
|
||||
import com.google.android.gms.location.LocationServices;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.PatientDataCache;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.CgHomeContracts;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.models.GeoFenceDetails;
|
||||
import com.app.simplitend.patient_dashboard.chats.SocketHelper;
|
||||
import com.app.simplitend.chats.SocketHelper;
|
||||
|
||||
public class DashBoardActivity extends AppCompatActivity implements CgHomeContracts.GetGeoFenceCallback {
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import com.app.simplitend.databinding.PatientDashboardFragmentBinding;
|
||||
import com.app.simplitend.patient_dashboard.DirectionToHomeActivity;
|
||||
import com.app.simplitend.patient_dashboard.NotificationsActivity;
|
||||
import com.app.simplitend.patient_dashboard.PatientMainViewModel;
|
||||
import com.app.simplitend.patient_dashboard.chats.ChatFragment;
|
||||
import com.app.simplitend.chats.ChatFragment;
|
||||
import com.app.simplitend.patientprofile.ProfileContracts;
|
||||
import com.app.simplitend.patientprofile.medreminder.mvvm.ReminderViewModel;
|
||||
import com.app.simplitend.patientprofile.medreminder.mvvm.models.NearestActivity;
|
||||
@@ -274,6 +274,7 @@ public class PatientDashboardFragment extends Fragment implements ProfileContrac
|
||||
patientData1.patientId + "",
|
||||
patientData1.caregiverId,
|
||||
patientData1.link_id,
|
||||
patientData1.caregiver_iamprincipal_id,
|
||||
patientData1.first_name,
|
||||
patientData.caregiver_name,
|
||||
sender_image,
|
||||
|
||||
@@ -17,12 +17,10 @@ import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.RetrofitHelper;
|
||||
import com.app.simplitend.caregiverdashboard.mvvm.NotificationApiService;
|
||||
import com.app.simplitend.locationupdates.LocationService;
|
||||
import com.app.simplitend.patient_dashboard.chats.SocketHelper;
|
||||
import com.app.simplitend.patient_dashboard.chats.mvvm.Message;
|
||||
import com.app.simplitend.chats.SocketHelper;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.google.android.gms.location.Geofence;
|
||||
import com.google.android.gms.location.GeofencingEvent;
|
||||
import com.onesignal.OneSignal;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
@@ -131,7 +129,7 @@ public class GeoFenceBroadcastReceiver extends BroadcastReceiver {
|
||||
@Override
|
||||
public void onSocketConnected() {
|
||||
Log.d(GEOFENCE_TAG, "doInBackground: SOCKET CONNECTED");
|
||||
socketHelper.sendMessage(message, cg_id + "", patientId + "", channel_id + "");
|
||||
socketHelper.sendMessage(message, cg_id + "", patientId + "", channel_id + "", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.app.simplitend.patientgeofencing;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.location.Address;
|
||||
import android.location.Location;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
@@ -12,7 +11,7 @@ import androidx.annotation.NonNull;
|
||||
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.RetrofitHelper;
|
||||
import com.app.simplitend.patient_dashboard.chats.SocketHelper;
|
||||
import com.app.simplitend.chats.SocketHelper;
|
||||
import com.app.simplitend.patientprofile.PatientProfileAPIService;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
import com.google.maps.model.LatLng;
|
||||
|
||||
@@ -118,34 +118,34 @@ public class ReminderAdapter extends RecyclerView.Adapter<ReminderAdapter.Remind
|
||||
String quantity = "";
|
||||
|
||||
if (reminder.medication_type != null && reminder.medication_type.size() > 0) {
|
||||
try {
|
||||
quantity = reminder.medication_type.get(0).title.toLowerCase();
|
||||
} catch (NullPointerException e) {
|
||||
// do nothing
|
||||
quantity = "unit";
|
||||
}
|
||||
quantity = reminder.medication_quantity + " " + quantity;
|
||||
switch (reminder.medication_type.get(0).title){
|
||||
case "Capsule":
|
||||
binding.medImg.setImageResource(R.drawable.ic_capsules);
|
||||
quantity = reminder.medication_quantity + " capsules";
|
||||
break;
|
||||
case "Tablet":
|
||||
binding.medImg.setImageResource(R.drawable.ic_pills);
|
||||
quantity = reminder.medication_quantity + " pills";
|
||||
break;
|
||||
case "Drop":
|
||||
binding.medImg.setImageResource(R.drawable.ic_drops);
|
||||
quantity = reminder.medication_quantity + " drops";
|
||||
break;
|
||||
case "Spoon":
|
||||
binding.medImg.setImageResource(R.drawable.ic_med_spoon);
|
||||
quantity = reminder.medication_quantity + " spoon";
|
||||
break;
|
||||
case "Cup":
|
||||
binding.medImg.setImageResource(R.drawable.ic_med_cup);
|
||||
quantity = reminder.medication_quantity + " cup";
|
||||
break;
|
||||
case "Syringe":
|
||||
binding.medImg.setImageResource(R.drawable.ic_syringe);
|
||||
quantity = reminder.medication_quantity + " syringe";
|
||||
break;
|
||||
default:
|
||||
binding.medImg.setImageResource(R.drawable.ic_other_med);
|
||||
quantity = reminder.medication_quantity + " units";
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
|
||||
@@ -50,8 +50,6 @@ public class Contact implements Serializable {
|
||||
this.phone_number = phoneNumber;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Contact(String first_name, String phone_number, String relationship, String email_address, String is_sos, String updated_at, String created_at) {
|
||||
this.first_name = first_name;
|
||||
this.phone_number = phone_number;
|
||||
|
||||
@@ -2,13 +2,8 @@ package com.app.simplitend.welcome.welcomepatient.fragments.register;
|
||||
|
||||
import android.app.DatePickerDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.InputFilter;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.Log;
|
||||
import android.util.Patterns;
|
||||
import android.view.LayoutInflater;
|
||||
@@ -23,17 +18,17 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.navigation.Navigation;
|
||||
|
||||
import com.app.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.app.simplitend.apputils.TextUtils;
|
||||
import com.google.i18n.phonenumbers.NumberParseException;
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.EditTextErrorRemover;
|
||||
import com.app.simplitend.apputils.TextUtils;
|
||||
import com.app.simplitend.databinding.RegisterFragmentBinding;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.WelcomeContracts;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.WelcomeViewModel;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.models.PatientData;
|
||||
import com.google.i18n.phonenumbers.NumberParseException;
|
||||
import com.google.i18n.phonenumbers.PhoneNumberUtil;
|
||||
import com.google.i18n.phonenumbers.Phonenumber;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PatientData {
|
||||
|
||||
public String one_signal_player_id;
|
||||
|
||||
public String caregiver_name, caregiver_profile_photo, caregiverId, link_id;
|
||||
public String caregiver_name, caregiver_profile_photo, caregiverId, link_id, caregiver_iamprincipal_id;
|
||||
|
||||
// progress flags
|
||||
public int isCareGiverLink
|
||||
|
||||
15
app/src/main/res/layout/activity_bottom_notification.xml
Normal file
15
app/src/main/res/layout/activity_bottom_notification.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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"
|
||||
android:background="@android:color/transparent"
|
||||
tools:context=".apputils.BottomNotificationActivity">
|
||||
|
||||
<View
|
||||
android:id="@+id/bsa_tint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
/>
|
||||
|
||||
</RelativeLayout>
|
||||
8
app/src/main/res/layout/activity_chats.xml
Normal file
8
app/src/main/res/layout/activity_chats.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.fragment.app.FragmentContainerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/chats_fcv"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
tools:context=".chats.ChatsActivity"/>
|
||||
@@ -20,7 +20,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/chatListFragment"
|
||||
android:name="com.app.simplitend.patient_dashboard.chats.ChatListFragment"
|
||||
android:name="com.app.simplitend.chats.ChatListFragment"
|
||||
android:label="ChatListFragment" >
|
||||
<action
|
||||
android:id="@+id/action_chatListFragment_to_chatFragment"
|
||||
@@ -28,7 +28,7 @@
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/chatFragment"
|
||||
android:name="com.app.simplitend.patient_dashboard.chats.ChatFragment"
|
||||
android:name="com.app.simplitend.chats.ChatFragment"
|
||||
android:label="ChatFragment" />
|
||||
<fragment
|
||||
android:id="@+id/patientProfileInfoFragment"
|
||||
|
||||
@@ -20,6 +20,13 @@
|
||||
|
||||
</style>
|
||||
|
||||
// bottom notification activity theme
|
||||
<style name="BottomNotification" parent="Theme.SimpliTend">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
</style>
|
||||
|
||||
// top corner rounded bottom sheet
|
||||
|
||||
<style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
|
||||
</style>
|
||||
|
||||
<style name="BottomNotification" parent="Theme.SimpliTend">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
</style>
|
||||
|
||||
// top corner rounded bottom sheet
|
||||
|
||||
<style name="BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
|
||||
|
||||
Reference in New Issue
Block a user