Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect fake gps #117

Closed
sibelius opened this issue Jun 24, 2016 · 5 comments
Closed

Detect fake gps #117

sibelius opened this issue Jun 24, 2016 · 5 comments

Comments

@sibelius
Copy link

How can I detect a fake gps using this library?

@cyrixmorten
Copy link
Contributor

You can inspect the Location object

https://developer.android.com/reference/android/location/Location.html#isFromMockProvider()

2016-06-24 15:40 GMT+02:00 Sibelius Seraphini notifications@github.com:

How can I detect a fake gps using this library?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#117, or mute
the thread
https://github.com/notifications/unsubscribe/AGV5OFtzTwSNn0NkjiQfRtcpKUhFqRRlks5qO95HgaJpZM4I9xjV
.

@sibelius
Copy link
Author

thanks

@sibelius
Copy link
Author

@cyrixmorten how long do u think that would take to when I click in a button, I read gps information and check if the gps is fake or not?

@sibelius
Copy link
Author

another problem is that isFromMockProvider is for min sdk > 18, I'm using min version of 15

@sibelius sibelius reopened this Jun 24, 2016
@cyrixmorten
Copy link
Contributor

I'm not sure what you mean to do.. If you request location updates without
setting it to mock mode, they will be valid Location updates.

The time it takes depends. However, even in poor visibility to satalites,
you should get a fused location update almost instantly (GSM, WiFi).

If your goal is to distinguish between whether or not the Location update
came from GPS or Network, then I believe you should be able to look for
whether or not certain information is available in the Location update. For
instance time, altitude, speed. Such information is only available for GPS
updates.
This checking of availability of data should be working for all sdk's.

2016-06-24 16:37 GMT+02:00 Sibelius Seraphini notifications@github.com:

another problem is that isFromMockProvider is for min sdk > 18, I'm using
min version of 15


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#117 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGV5OPoBOKqiZuiyVYcM0LPlL14H5DyJks5qO-ubgaJpZM4I9xjV
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants