Questions tagged [gps]

Abbreviation for Global Positioning System; a navigational system using satellite signals to fix the location of a radio receiver on or above the earth's surface. Also "GPS" refers to the radio receiver used to receive GPS signals.

Global Positioning System (GPS) is a space-based global navigation satellite system (GNSS) that provides reliable location and time information in all weather and at all times and anywhere on or near the Earth when and where there is an unobstructed line of sight to four or more GPS satellites.

It is freely accessible to anybody with a GPS receiver. Apple, Google, and other mobile providers have developed frameworks to deal with the location services calculated from GPS, WiFi or Cell Tower.

More information can be found at:

10257 questions
765
votes
22 answers

How do I get the current GPS location programmatically in Android?

I need to get my current location using GPS programmatically. How can i achieve it?
mudit
  • 25,306
  • 32
  • 90
  • 132
512
votes
36 answers

How to emulate GPS location in the Android Emulator?

I want to get longitude and latitude in Android emulator for testing. Can any one guide me how to achieve this? How do I set the location of the emulator to a test position?
UMAR-MOBITSOLUTIONS
  • 77,236
  • 95
  • 209
  • 278
215
votes
11 answers

How do I find out if the GPS of an Android device is enabled

On an Android Cupcake (1.5) enabled device, how do I check and activate the GPS?
Marcus
  • 8,601
  • 4
  • 24
  • 24
174
votes
9 answers

Android : LocationManager vs Google Play Services

I want to build an app that centers around getting the user's current location and then find points of interest(such as bars,restaurants,etc) that are close to him/her via the Google Places API. Upon searching the web for a place to start I came…
SoCo
  • 1,934
  • 2
  • 15
  • 20
173
votes
17 answers

How can I enable or disable the GPS programmatically on Android?

I know that the question about turning on/off GPS programatically on android has been discussed many times, and the answer is always the same: "You can't for security/privacy reasons, you have to forward to location preferences screen and let the…
maid450
  • 7,478
  • 3
  • 37
  • 32
156
votes
12 answers

Smooth GPS data

I'm working with GPS data, getting values every second and displaying current position on a map. The problem is that sometimes (specially when accuracy is low) the values vary a lot, making the current position to "jump" between distant points in…
Al.
  • 1,811
  • 4
  • 15
  • 8
155
votes
12 answers

Haversine formula in Python (bearing and distance between two GPS points)

Problem I would like to know how to get the distance and bearing between two GPS points. I have researched on the haversine distance. Someone told me that I could also find the bearing using the same data. Everything is working fine, but the…
avitex
  • 2,478
  • 3
  • 22
  • 22
153
votes
21 answers

How to mock location on device?

How can I mock my location on a physical device (Nexus One)? I know you can do this with the emulator in the Emulator Control panel, but this doesn't work for a physical device.
Isaac Waller
  • 32,709
  • 29
  • 96
  • 107
132
votes
3 answers

How to get current location in Android

I'm having troubles of getting my current position coordinates using the NETWORK provider of android location system. Already read a lot of tutorials and implemented 4 or 5 existing classes to my project and all of them are giving me the last…
Boris Pawlowski
  • 1,781
  • 4
  • 16
  • 22
123
votes
13 answers

Best way to get user GPS location in background in Android

In my android app i want to get user current location every few minute interval and update in to my center server using web service. Currently i am using Fused Location Provide for get user current location, See link now i want to know what is the…
Ravi Bhandari
  • 4,682
  • 8
  • 40
  • 68
114
votes
3 answers

Android "gps requires ACCESS_FINE_LOCATION" error, even though my manifest file contains this

Each time I run the application, my SecurityException gets thrown and the error from the debugger reads as so: java.lang.SecurityException: "gps" location provider requires ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission. This seems like…
Jason Cromer
  • 1,468
  • 3
  • 11
  • 21
101
votes
10 answers

Disable / Check for Mock Location (prevent gps spoofing)

Looking to find the best way to prevent / detect GPS spoofing on Android. Any suggestions on how this is accomplished, and what can be done to stop it? I am guessing the user has to turn on mock locations to spoof GPS, if this is done, then they can…
Chrispix
  • 17,941
  • 20
  • 62
  • 70
97
votes
10 answers

Algorithm to find all Latitude Longitude locations within a certain distance from a given Lat Lng location

Given a database of places with Latitude + Longitude locations, such as 40.8120390, -73.4889650, how would I find all locations within a given distance of a specific location? It doesn't seem very efficient to select all locations from the DB and…
Val Schuman
  • 1,798
  • 2
  • 18
  • 23
92
votes
13 answers

Cannot resolve Manifest.permission.ACCESS_FINE_LOCATION

When adding permissions to my manifest file, the below xml works. However, this xml doesn't work.
Pablo Cegarra
  • 20,955
  • 12
  • 92
  • 110
91
votes
8 answers

Get current location of user in Android without using GPS or internet

Is it possible to get the current location of user without using GPS or the internet? I mean with the help of mobile network provider.
Prabhu M
  • 3,534
  • 8
  • 48
  • 87
1
2 3
99 100