From e361d34fb99e14fbd4fb2cab9c04ea141a1eeb70 Mon Sep 17 00:00:00 2001 From: amit kale Date: Mon, 13 Mar 2023 11:49:35 +0530 Subject: [PATCH] 1. Upgraded location and maps version --- woosmapgeofencing/build.gradle | 4 ++-- .../woosmapgeofencing/WoosmapMessageBuilderMaps.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/woosmapgeofencing/build.gradle b/woosmapgeofencing/build.gradle index 2a42e4c..c335fba 100644 --- a/woosmapgeofencing/build.gradle +++ b/woosmapgeofencing/build.gradle @@ -46,13 +46,13 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - implementation 'com.google.android.gms:play-services-location:18.0.0' + implementation 'com.google.android.gms:play-services-location:21.0.1' implementation 'androidx.multidex:multidex:2.0.1' implementation 'org.ojalgo:ojalgo:37.1.1' implementation 'com.google.truth:truth:1.1.3' - implementation 'com.google.android.gms:play-services-maps:17.0.1' + implementation 'com.google.android.gms:play-services-maps:18.1.0' testImplementation 'junit:junit:4.13.2' diff --git a/woosmapgeofencing/src/main/java/com/webgeoservices/woosmapgeofencing/WoosmapMessageBuilderMaps.java b/woosmapgeofencing/src/main/java/com/webgeoservices/woosmapgeofencing/WoosmapMessageBuilderMaps.java index efff469..4c10469 100644 --- a/woosmapgeofencing/src/main/java/com/webgeoservices/woosmapgeofencing/WoosmapMessageBuilderMaps.java +++ b/woosmapgeofencing/src/main/java/com/webgeoservices/woosmapgeofencing/WoosmapMessageBuilderMaps.java @@ -28,6 +28,7 @@ import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import com.google.android.gms.location.FusedLocationProviderClient; +import com.google.android.gms.location.LocationServices; import com.google.android.gms.tasks.OnSuccessListener; import com.google.gson.Gson; import com.webgeoservices.woosmapgeofencing.SearchAPIDataModel.Feature; @@ -368,7 +369,7 @@ private void getLatestLocation(Context context, OnSuccessListener succ if (ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { Log.d(WoosmapSettings.Tags.WoosmapSdkTag, "No permission"); } else { - FusedLocationProviderClient locationProvider = new FusedLocationProviderClient(context); + FusedLocationProviderClient locationProvider = LocationServices.getFusedLocationProviderClient(context); locationProvider.getLastLocation().addOnSuccessListener(successListener); } }