Skip to content

Commit

Permalink
Upgrade gms-location version
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-osm committed Jun 23, 2023
1 parent cd91051 commit e6dbc10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion OsmAnd/build-common.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -419,5 +419,5 @@ dependencies {
implementation "androidx.car.app:app:1.2.0"
implementation "androidx.car.app:app-projected:1.2.0"

implementation 'com.google.android.gms:play-services-location:20.0.0'
implementation 'com.google.android.gms:play-services-location:21.0.1'
}
24 changes: 1 addition & 23 deletions OsmAnd/src/net/osmand/plus/helpers/GmsLocationServiceHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,7 @@ public GmsLocationServiceHelper(@NonNull OsmandApplication app) {
this.app = app;

fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(app);

fusedLocationRequest = LocationRequest.create()
// Sets the desired interval for active location updates. This interval is inexact. You
// may not receive updates at all if no location sources are available, or you may
// receive them less frequently than requested. You may also receive updates more
// frequently than requested if other applications are requesting location at a more
// frequent interval.
//
// IMPORTANT NOTE: Apps running on Android 8.0 and higher devices (regardless of
// targetSdkVersion) may receive updates less frequently than this interval when the app
// is no longer in the foreground.
.setInterval(100)

// Sets the fastest rate for active location updates. This interval is exact, and your
// application will never receive updates more frequently than this value.
//.setFastestInterval(50)

// Sets the maximum time when batched location updates are delivered. Updates may be
// delivered sooner than this interval.
.setMaxWaitTime(0)

.setPriority(Priority.PRIORITY_HIGH_ACCURACY);

fusedLocationRequest = new LocationRequest.Builder(Priority.PRIORITY_HIGH_ACCURACY, 100).build();
fusedLocationCallback = new com.google.android.gms.location.LocationCallback() {
@Override
public void onLocationResult(@NonNull LocationResult locationResult) {
Expand Down

0 comments on commit e6dbc10

Please sign in to comment.