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
0 answers

How to send location updates while device is idle using Android O?

In my code sample, location updates are not sent on an Android O device when it goes into idle (doze) mode. Has anyone gotten this to work? There are no issues on any devices prior to Android O (before API 26 added the location update…
JCraw
  • 404
  • 2
  • 12
2
votes
1 answer

How much battery does GPS consume?

According to the Location Strategies, GPS is most accurate but quickly consumes battery power. The document recommends that battery power should be among the things to take into account but from that document there is no example of a bad…
2
votes
1 answer

Do PWAs already support GPS?

We are currently working on a PWA for our clients. I am very excited about this new technology. Still it seems that there are still some important features missing compared to native Apps. For us it would be important that we can use GPS and more…
searching_joe
  • 51
  • 1
  • 2
2
votes
3 answers

Android Location Object Always Null

I'm simply trying to write a method that returns Latitude and Longitude. I have an activity with a button and two text fields. The java class I am using extends AppCompatActivity and implements LocationListener When the button is pressed the…
2
votes
4 answers

How to calculate distance every 15 sec with using GPS heavy accuracy

I get the GPS location 3 way like Map.getMyLocation().getLatitude(), locationManager and mGoogleApiClient. but these are not helped for me for calculating distance every 15 sec. problem is location latitude and longitude are not accurately i.e I am…
Akash pasupathi
  • 304
  • 1
  • 14
2
votes
1 answer

Enabled/disabled listener using FusedLocationApi?

The regular Android (non-Fused) LocationListener https://developer.android.com/reference/android/location/LocationListener.html has the methods onProviderEnabled and onProviderDisabled, so that you can listen for when the user turns off/on the GPS.…
2
votes
1 answer

Displaying Allow app to access device's location

I am new to android programming and I need to display an alert so that user give permission to my app automatically when he/she clicks on the allow button. Like this app but actually my code does a message that will just take the user to the…
asmgx
  • 7,328
  • 15
  • 82
  • 143
2
votes
1 answer

Cordova geolocation plugin issue

Cordova geolocation plugin works only with phone's GPS location. If phone GPS is not locked (e.g. being inside the building), then it should take the COARSE_LOCATION i.e. WIFI or Cellular tower. I checked it by providing it only the permission of…
2
votes
1 answer

Multi-Sensor Android Logging

I am new to Android and I try to do a simple app that can log accelerometer, Gyro and GPS into a single csv file (background) so I could analyze the data later. After some digging in google, all the info I get are kinda old and some are not really…
2
votes
2 answers

How to update user location continuously

I want to get a user's location on a map, but I want this to update continuously for a map. The tutorials that I've found usually show how to fetch the user's coordinates once. Ideally, I'd get their location every ten seconds. How would I…
sadegh sarvi
  • 164
  • 4
  • 15
2
votes
0 answers

Android device returning same GPS point when in background (Android 6.0.1)

Have been experiencing GPS issues while testing on Samsung J3 (SM-J320V w/ Android 6.0.1). I am using an AlarmManager in combination with the FusedLocationAPI (GPS and WiFi on) to schedule location being sent to our server in regular 30 second to 1…
Potato
  • 121
  • 3
  • 6
2
votes
1 answer

lollipop and marshmallow gps issue not able to fetch longitude and latitude values but same code working on api below 21

I have been through lot of questions in stack overflow **but not able to solve my problem its not any spam question ** Hi everyone i am having a problem related to latitude and longitude values iam able to fetch values in all api till Android 5.0…
Rakesh Ram
  • 19
  • 1
  • 2
  • 9
2
votes
1 answer

Android fused loation using Google API

I am a beginner Android developer. I'm using Android Studio to build an app that gives you the exact location and keep updating it every time period. I used GPS and network provider by creating a GPStracker class that gives me the latitude and…
2
votes
1 answer

Android app missing status bar icon when accessing location services

Ok this is a weird one but I maybe missing something that is obvious. I am currently accessing the user location using this function: public String[] getGeoCoords() { String[] geoCoords = new String[2]; String mprovider =…
MarkDev
  • 23
  • 3
2
votes
2 answers

requestLocationUpdates() takes too much time OR it does not works at all

I have used requestLocationUpdates method inside Service in my Android application for getting updates whenever location of my device changes. I have set minTime = 0 But this requestLocationUpdates method is giving update after very long delays…
Sajal Ali
  • 427
  • 1
  • 10
  • 21