Select to view content in your preferred language

Is it possible to determine if location is mocked?

1028
3
Jump to solution
10-12-2021 11:08 AM
DenisRomanovas
Occasional Contributor

Dear colleagues,

I have quite a big issue 🙂

I use ESRI's LocationDisplay module to get user locations and it seems there is no way to determine if a location is mocked one! I have a big requirement to disallow mocked locations...

Am I right that LocationDisplay module can't tell me if a location is mocked one? Or did I miss something?

If I have a need to filter out mocked locations, should I use native Android GPS methods to get GPS coordinates and abandon ESRI's LocationDisplay?

Any tips maybe? Help would be much appreciated 🙂

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
ChanganShi1
Regular Contributor

Yes, the LocationDisplay itself cannot detect if a location is mocked or not. What do you mean to use "native Android GPS methods to get GPS coordinates"? The location display is responsible for displaying a location on the map view, the location data source is the location provider, which is open to extend and wrap any location service, it is also a place to filter out some locations to feed the location display.

View solution in original post

3 Replies
ChanganShi1
Regular Contributor

Yes, the LocationDisplay itself cannot detect if a location is mocked or not. What do you mean to use "native Android GPS methods to get GPS coordinates"? The location display is responsible for displaying a location on the map view, the location data source is the location provider, which is open to extend and wrap any location service, it is also a place to filter out some locations to feed the location display.

DenisRomanovas
Occasional Contributor

Thank you for reply! Sounds quite promising if I get it right.

I meant using something like com.google.android.gms.location.FusedLocationProviderClient.

So basically it's quite possible to use something like com.google.android.gms.location.FusedLocationProviderClient as LocationDisplay's location data source, right?

0 Kudos
ChanganShi1
Regular Contributor

Yes, you could extend LocationDataSource by wrapping the FusedLocationProvider, set the new location data source to the location display. By default, the location display uses the  `AndroidLocationDataSource` which wraps the Android LocationManager.