Questions tagged [android-gps]

Android's GPS device and related API features.

Android provides a Location and Sensors API for programmatical access to its GPS device.

733 questions
2
votes
1 answer

Disabling all radios from the system level; AOSP

I'm trying to disable radios for things like WiFi, BT, GPS, and any other telemetry from the system level on AOSP. Specifically, I'm trying to do it in a quick-settings tile or an item on the shutdown menu, but I'm not quite sure how to embark on…
2
votes
0 answers

getCellLocation return null when location is off

For tracking devices with BTS, I need CID and Lac. In some device like Asus and Huawei when location(gps) is off cant tracking and return null all of these methods. /** Current Location Area Code */ int mCurLAC = 0; /** Current Location…
Shahab Saalami
  • 862
  • 10
  • 18
2
votes
0 answers

How to recover the spatial probability distribution of a GPS location from its accuracy?

A location coordinate determined by GPS is not perfectly accurate. It follows a probability distribution. An Android location comes with an accuracy property. The Android Developer docs for Location.getAccuracy() says: We define horizontal…
2
votes
0 answers

Get user location with "Device Only" in Android

Context: I have been using FusedLocationProviderClient to get user's location. When the phone is in High Accuracy mode, everything works as expected. However, not all phones are in high accuracy. So, how can I manage to get the user location by GPS…
2
votes
0 answers

Crash in some com.google.android.gms.* module

I have updated my unity game with latest(November 13, 2018) Google Play Services modules. And now, I see crashes in my play console: java.lang.Error: FATAL EXCEPTION [main] Unity version : 2018.3.0b10 Device model : samsung SM-A520F Device…
2
votes
1 answer

Libgdx/Java: After converting GPS to pixelcoordinates, route is rotated 90°

I had written before about implementing a map in my libgdx project. I did that using a snapshot of said google map, importing the GPS bounds of the snapshot, the route-latlong values, a locationservice (via interface) and the snapshot as…
Thall
  • 51
  • 5
2
votes
0 answers

Android GPS showing different location and counting wrong distance

i'm making app where i using GPS and counting traveled distance, i'm downloading current loaction and counting distance between two location. When i'm trying to get current location it is showing me different location (i don't move my phone) and…
P.W94
  • 55
  • 1
  • 7
2
votes
0 answers

Get High Accuracy Location on Android using fused location

I tried to get current user location on button press and show the address on screen. I am using google fused location as follow locationClient = LocationServices.getFusedLocationProviderClient(this) locationRequest =…
2
votes
1 answer

FusedLocationApi Performance Issue: Accuracy seems capped at 10.0 meters

I'm experiencing a strange problem where the FusedLocationProviderAPI does not give me a better Accuracy number then 10.0 meters. It starts like normal giving me a high number of, for example, 56 meters... 24... 13... and then stays at 10.0.…
thelastchief
  • 211
  • 3
  • 12
2
votes
0 answers

onLocationChanged() is not being called automatically inside service

Written a Service class to fetch the location, it is fetching the location on some devices like Samsung s7 edge while failed to fetch location on devices like Samsung j5. I just want to know whether it is code issue or mobile specific issue. The…
fazal nabi
  • 39
  • 1
  • 4
2
votes
1 answer

Android : location service returns different number at each and every time - Why?

Hi I am working on a app and i need to fetch the exact (accurate,to the extent) latitude and longitude. The method i used is LocationListener but the issue is, each and every time i am getting different numbers for the same location - say almost a…
Pradeep Kumar
  • 51
  • 1
  • 6
2
votes
1 answer

How Some Applications like Waze Turn on GPS programmatically?

I searched a lot about turning on GPS programmatically but I didn't find any solution for it. But there are some applications like Waze that aren't system applications and can turn on GPS! for example in Waze at the show this popup (If your GPS be…
Ehsan
  • 2,676
  • 6
  • 29
  • 56
2
votes
2 answers

Showing current location in offline mode with gps

Hi I am a bit new to android and I have been wanted to develop an android app which is supposed to show the current location of the user on a map like google map in offline mode. Can I show the location with just GPS and without Internet connection…
2
votes
3 answers

In Android ,how to receive GPS location continuously?

Issue in onLocationChanged() function of location listener of android.location.LocationListener. In Below code after requesting requestLocationUpdates of LocationManager, the onLocationChanged is called in uneven intervals, i.e i have set period at…
2
votes
1 answer

Is there a way to detect Location is OFF on Android Wear Watch as opposed to not present

I have developed a Referee Watch (https://play.google.com/store/apps/details?id=com.pipperpublishing.soccerrefpro) which tracks referees field coverage and other fitness stats using the watch GPS. This is NOT a question about ACCESS_FINE_LOCATION…
Opus1217
  • 723
  • 4
  • 17