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
26
votes
3 answers

Android find GPS location once, show loading dialog

I am writing an app that requires the user's current location (lastknownlocation won't be very helpful) and displays a list of all the closest "items" to them taken from the database. I have got the finding of the closest items working well but only…
Daniel Bowden
  • 988
  • 1
  • 10
  • 23
26
votes
3 answers

how I can get the city name of my current position?

I'm working with android studio and in a popup dialog I want that users can get their position but all I know to do is get my latitude and longitude. This is the code import android.app.Activity; import android.content.Context; import…
Rick
  • 3,943
  • 6
  • 33
  • 45
26
votes
11 answers

How to detect when user turn on/off GPS state?

I want to block the user from changing WiFi, GPS and loading settings from my application. The user need not on/off WiFi and GPS while running my application.(From notification bar). Is there any BroadcastReceiver exist for listening GPS on/off?
Devu Soman
  • 2,246
  • 13
  • 36
  • 57
25
votes
4 answers

Android : Samsung Galaxy Tabs and Android 2.2 Devices Showing GPS date 1 Day Advance from 1st jan 2012

I have the Galaxy tab GT-P1000 7 inch with firmware version 2.3.3 and Phones running Android 2.2. In both versions when ever I am trying to get the time from GPS, its showing 1 day advance from 1st jan 2012. Same code is working fine on Samsung, LG…
25
votes
5 answers

How to calculate distance from a GPX file?

I have a GPX file with a GPS track. Now I want to calculate the distance I covered with this track. What's the best way to calculate this?
guerda
  • 23,388
  • 27
  • 97
  • 146
25
votes
4 answers

How can I get continuous location updates in Android like in Google Maps?

I'm building a friend tracking android app. While my friend activated the app and goes away along with his GPS and cellular data on, I need to track him on my device. That's the concept. I've implemented LocationListener class and now I can get…
Sangeeth Nandakumar
  • 1,362
  • 1
  • 12
  • 23
25
votes
7 answers

Which Devices Support Javascript Geolocation via navigator.geolocation?

The iPhone supports geolocation in mobile Safari via the following call: navigator.geolocation.getCurrentPosition( function(pos){ var lat = pos.coords.latitude; var long = pos.coords.longitude; }, function(){ /* Handler if location…
Maciek
  • 3,322
  • 6
  • 28
  • 35
25
votes
4 answers

Get country from coordinates?

How to get country name in Android, If are known geo coordinates? How to make it the simplest way?
ArtKorchagin
  • 4,801
  • 13
  • 42
  • 58
24
votes
5 answers

Foreground service not receiving location updates in Android 7.0+ when screen is off

I am trying to create an Android application that continuously logs device location data in realtime while the device screen is off. My code works correctly with Android 6.0 and earlier but it seems that Android 7.0+ breaks my app. I have…
Joshua W
  • 4,973
  • 5
  • 24
  • 30
24
votes
4 answers

iOS GPS tracking app that runs all the time

I am trying to make an app to track the user GPS all the time, this app is a kind of car GPS tracker to get the location of driver all the time and send it to server. I have tried to add "location updates" to the "background modes" but the app will…
TMMDev
  • 473
  • 1
  • 5
  • 10
24
votes
2 answers

ACCESS_COARSE_LOCATION permission gives a cell tower precision on Android

I am making some tests with the requestLocationUpdates() function from the FusedLocationApi. I am using the PRIORITY_BALANCED_POWER_ACCURACY. A city block precision is fine for me. When I request the ACCESS_FINE_LOCATION permission, I get around a…
poiuytrez
  • 21,330
  • 35
  • 113
  • 172
24
votes
6 answers

Calculate sunrise and sunset times for a given GPS coordinate within PostgreSQL

I want to classify timestamp data types in a PostgreSQL table with regards to whether they can be considered "at day" or "at night". In other words I want to be able to calculate sunrise and sunset times accurately, given a particular GPS position.…
zaadeh
  • 1,711
  • 2
  • 23
  • 37
23
votes
11 answers

why getSpeed() always return 0 on android

I need to get the speed and heading from the gps. However the only number i have from location.getSpeed() is 0 or sometimes not available. my code: String provider = initLocManager(); if (provider == null) return false; …
user591539
  • 233
  • 1
  • 2
  • 4
23
votes
1 answer

iOS Multi-Tasking Track GPS Location

I was just wondering if it was possible to make an iOS app that would track your location via GPS while it was in the background. I tried this with the built-in app "Maps", but to no avail. If this is possible, it would be great if you could refer…
Linuxmint
  • 4,716
  • 11
  • 44
  • 64
23
votes
3 answers

How accurate is the GPS Clock?

In my company we do have critical systems that require an accurate time. As so, we have an NTP server appliance with an outdoor GPS antenna that receives the time from the GPS satellites. My questions are: How accurate is the time clock? Is it…
Andre
  • 598
  • 1
  • 7
  • 18