Maheswaran Murugan
Maheswaran Murugan

Reputation: 101

What is the difference to getting the location by using Location Manager and Fused Location Provider Api?

I need the real time difference to getting location using by Location Manager and Fused Api. I have checked with both, in Fused api(GPS) I am getting 7 digit after decimal point, but using by Location Manager(GPS) I will get nearly 15 digits after decimal point.

  1. Which one is better to get accurate user current location?

  2. What is the difference between Location Manager and Fused Api?

  3. Why we need to migrate from Location Manager to Fused Api?

  4. I used LocationRequest.PRIORITY_HIGH_ACCURACY, suppose I am in indoor, network is not available, how it returns the location?

  5. Is it return the lastknown location, even I didn't write the code in onConnected()?

Upvotes: 10

Views: 3743

Answers (3)

Gun
Gun

Reputation: 11

I think the difference is: Location Manager: you can choose specific resource provider such as

LocationManager.GPS_PROVIDER or LocationManager.NETWORK_PROVIDER

FusedLocation supplies a fast way to detect your location using combine of these provider above.

Upvotes: 1

ghost talker
ghost talker

Reputation: 392

I think that the difference between them is that one use the physical sensor directly (Location Manager), where as other take assistance from the network/internet .

To me the more accurate is Location Manager but it takes some time and location detection speed depends on some factors such as you are on open place or not , weather etc..

Upvotes: 1

RuAware
RuAware

Reputation: 969

Related

Have found a previous answer for you, looks like FusedLocationProvider is going to be better

Upvotes: 2

Related Questions