Skip to content
Discussion options

You must be logged in to vote

This request says that GPS should run in the background.

var request = new GpsRequest
      {
        BackgroundMode = GpsBackgroundMode.Realtime,
        Accuracy = GpsAccuracy.Normal,
        DistanceFilterMeters = 0,
      };

This call

await this.gpsManager.StartListener(request).ConfigureAwait(false);

Will make it run automatically if the app is swiped away and then restarted until you call IGpsManager.StopListener

builder.Services.AddGps();

Running your GpsRequest with backgroundmode and realtime arg is not right and should cause an error. If you don't want GPS to run in the background, you should just use GpsBackgroundMode.None. V3 doesn't auto start if those values aren't set and…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@aritchie
Comment options

Answer selected by FREE2WIN2
Comment options

You must be logged in to vote
2 replies
@aritchie
Comment options

@FREE2WIN2
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants