,
This commit is contained in:
13
.idea/deploymentTargetDropDown.xml
generated
13
.idea/deploymentTargetDropDown.xml
generated
@@ -1,17 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetDropDown">
|
||||
<runningDeviceTargetSelectedWithDropDown>
|
||||
<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" />
|
||||
</Key>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</runningDeviceTargetSelectedWithDropDown>
|
||||
<targetSelectedWithDropDown>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
@@ -23,7 +12,7 @@
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-12-13T14:28:39.050950Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2023-12-14T10:38:34.929987Z" />
|
||||
<targetsSelectedWithDialog>
|
||||
<Target>
|
||||
<type value="QUICK_BOOT_TARGET" />
|
||||
|
||||
@@ -20,7 +20,13 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug{
|
||||
buildConfigField "String", "SIMPLITEND_BASE_URL", SIMPLITEND_BASE_URL
|
||||
buildConfigField "String", "SIMPLITEND_SOKCET_HOST", SIMPLITEND_SOKCET_HOST
|
||||
}
|
||||
release {
|
||||
buildConfigField "String", "SIMPLITEND_BASE_URL", SIMPLITEND_BASE_URL
|
||||
buildConfigField "String", "SIMPLITEND_SOKCET_HOST", SIMPLITEND_SOKCET_HOST
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class BootCompleteReceiver extends BroadcastReceiver {
|
||||
@RequiresPermission(Manifest.permission.ACCESS_FINE_LOCATION)
|
||||
private void addGeoFence(@NonNull LatLng latLng, float GEOFENCING_RADIUS , Context context) {
|
||||
|
||||
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(context);
|
||||
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(context.getApplicationContext());
|
||||
GeofencingClient geofencingClient = LocationServices.getGeofencingClient(context);
|
||||
|
||||
// checking for background location updates for API level 29 and above
|
||||
|
||||
@@ -164,7 +164,7 @@ public class NotificationService implements INotificationServiceExtension {
|
||||
private void addGeoFence(@NonNull LatLng latLng, double GEOFENCING_RADIUS, String message, Context context) {
|
||||
AppUtil.removeGeofence(context);
|
||||
|
||||
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(context);
|
||||
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(context.getApplicationContext());
|
||||
GeofencingClient geofencingClient = LocationServices.getGeofencingClient(context);
|
||||
|
||||
// checking for background location updates for API level 29 and above
|
||||
|
||||
@@ -10,16 +10,7 @@ import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
public abstract class RetrofitHelper {
|
||||
|
||||
// urls
|
||||
|
||||
// Testing BASE URL
|
||||
// private static final String BASE_URL = "https://simplitend.betadelivery.com/";
|
||||
|
||||
// Staging BASE URL
|
||||
// private static final String BASE_URL = "https://simplitendapp.betadelivery.com/";
|
||||
private static final String BASE_URL = "https://staging.simplitend.com/";
|
||||
|
||||
public static final String IMAGE_BASE_URL = BASE_URL + "storage/upload/";
|
||||
public static final String IMAGE_BASE_URL = BuildConfig.SIMPLITEND_BASE_URL + "storage/upload/";
|
||||
|
||||
public static final String CREATE_CONTACT = "api/contact-create";
|
||||
|
||||
@@ -49,7 +40,7 @@ public abstract class RetrofitHelper {
|
||||
}
|
||||
|
||||
retrofit = new Retrofit.Builder()
|
||||
.baseUrl(BASE_URL)
|
||||
.baseUrl(BuildConfig.SIMPLITEND_BASE_URL)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.client(builder.build())
|
||||
.build();
|
||||
|
||||
@@ -126,7 +126,11 @@ public class CgDashBoardFragment extends Fragment implements
|
||||
|
||||
loadReminders();
|
||||
loadActivities();
|
||||
requireContext().registerReceiver(notification_receiver, new IntentFilter(AppUtil.NOTIFICATION_ACTION));
|
||||
try {
|
||||
requireContext().registerReceiver(notification_receiver, new IntentFilter(AppUtil.NOTIFICATION_ACTION));
|
||||
} catch (Exception e) {
|
||||
// do nothing
|
||||
}
|
||||
}), true);
|
||||
|
||||
initViews();
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.util.Log;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.app.simplitend.BuildConfig;
|
||||
import com.app.simplitend.chats.mvvm.Author;
|
||||
import com.app.simplitend.chats.mvvm.Message;
|
||||
import com.app.simplitend.chats.mvvm.Receiver;
|
||||
@@ -24,8 +25,6 @@ public class SocketHelper {
|
||||
|
||||
private static final String TAG = "SOCKET_CHAT_TAG";
|
||||
|
||||
public static final String kHost = "https://staging.simplitend.com:3002/";
|
||||
|
||||
private static SocketHelper instance;
|
||||
private Socket mSocket;
|
||||
private SockCallBack socketCallback;
|
||||
@@ -35,7 +34,7 @@ public class SocketHelper {
|
||||
IO.Options options = new IO.Options();
|
||||
options.forceNew = true;
|
||||
options.reconnection = true;
|
||||
mSocket = IO.socket(kHost, options);
|
||||
mSocket = IO.socket(BuildConfig.SIMPLITEND_SOKCET_HOST, options);
|
||||
|
||||
mSocket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.app.simplitend.chats.mvvm;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import com.app.simplitend.BuildConfig;
|
||||
import com.app.simplitend.welcome.welcomepatient.mvvm.models.CallResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -21,7 +22,7 @@ public class ChatViewModel extends ViewModel {
|
||||
|
||||
public ChatViewModel() {
|
||||
this.apiService = new Retrofit.Builder()
|
||||
.baseUrl("https://staging.simplitend.com/")
|
||||
.baseUrl(BuildConfig.SIMPLITEND_BASE_URL)
|
||||
.addConverterFactory(GsonConverterFactory.create())
|
||||
.build().create(ChatsApiService.class);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ public class PatientMainViewModel extends ViewModel {
|
||||
private void addGeoFence(@NonNull LatLng latLng, float GEOFENCING_RADIUS , Activity activity, String unit, String message) {
|
||||
AppUtil.removeGeofence(activity);
|
||||
|
||||
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(activity);
|
||||
GeoFenceHelper geoFenceHelper = new GeoFenceHelper(activity.getApplicationContext());
|
||||
GeofencingClient geofencingClient = LocationServices.getGeofencingClient(activity);
|
||||
|
||||
// checking for background location updates for API level 29 and above
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.app.simplitend.patientgeofencing;
|
||||
|
||||
import static com.app.simplitend.chats.SocketHelper.kHost;
|
||||
import static com.app.simplitend.locationupdates.LocationService.LOCATION_INTERVAL_BASE_TIME;
|
||||
import static com.app.simplitend.locationupdates.LocationService.LOCATION_NOTIFICATION_CHANNEL_ID;
|
||||
import static com.app.simplitend.locationupdates.LocationService.LOCATION_UPDATE_MIN_INTERVAL;
|
||||
@@ -15,13 +14,13 @@ import android.content.pm.PackageManager;
|
||||
import android.location.Location;
|
||||
import android.os.Build;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
|
||||
import com.app.simplitend.BuildConfig;
|
||||
import com.app.simplitend.R;
|
||||
import com.app.simplitend.apputils.AppUtil;
|
||||
import com.app.simplitend.apputils.RetrofitHelper;
|
||||
@@ -47,6 +46,7 @@ public class GeoFenceBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Log.d(GEOFENCE_TAG, "onReceive: GEOFENCE RECEIVER TRIGGERED");
|
||||
GeofencingEvent geofencingEvent = GeofencingEvent.fromIntent(intent);
|
||||
|
||||
if (geofencingEvent == null || geofencingEvent.hasError()) {
|
||||
@@ -159,7 +159,7 @@ public class GeoFenceBroadcastReceiver extends BroadcastReceiver {
|
||||
IO.Options options = new IO.Options();
|
||||
options.forceNew = true;
|
||||
options.reconnection = true;
|
||||
Socket mSocket = IO.socket(kHost, options);
|
||||
Socket mSocket = IO.socket(BuildConfig.SIMPLITEND_SOKCET_HOST, options);
|
||||
|
||||
mSocket.on(channel_id + "", new Emitter.Listener() {
|
||||
@Override
|
||||
|
||||
@@ -19,4 +19,14 @@ android.useAndroidX=true
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.enableJetifier=true
|
||||
android.enableJetifier=true
|
||||
|
||||
# production
|
||||
SIMPLITEND_BASE_URL="https://app.simplitend.com/"
|
||||
SIMPLITEND_SOKCET_HOST="https://app.simplitend.com:3002/"
|
||||
|
||||
# staging
|
||||
#SIMPLITEND_BASE_URL="https://staging.simplitend.com/"
|
||||
|
||||
# development
|
||||
#SIMPLITEND_BASE_URL="https://simplitend.betadelivery.com/"
|
||||
Reference in New Issue
Block a user