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
4
votes
1 answer

Getting WIFI SSID in Android 8.1 without GPS

I need to find the SSID of the current connected method. I've read this already, but it uses GPS, which I don't want to. Is there a way I can achieve that?
Samplasion
  • 527
  • 4
  • 17
4
votes
4 answers

Android GPS Location Periodically

I want to create an App which fetch user's location in every 5 min between 9:00 AM to 9:00 PM. Now i am not able to think the flow. I am confused on: Should i implement 2 repeating alarm managers , one for every 5 min and another one for time slot.…
4
votes
1 answer

Can the android emulator simulate altitude with a gpx file?

I am trying to simulate motion of the emulator device in the ddms perspective. I am using a gpx file which contains elevation elements, but when my code runs, it only retrieves lat/lon and says that elevation = 0. My question is, Can the android…
Dave
  • 63
  • 1
  • 6
4
votes
1 answer

Gps location is null

I am trying to make an app that gave me the position in a TextView but the result if I enable Fine location is null: public class Gpslocation extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { …
Jbell
  • 313
  • 2
  • 7
4
votes
1 answer

Android Smart Location Library is always connected to gps after application closed

I'm developing an application which gets the user location at start. I am using Smart Location Library to fetch the location and reverse geocode. But the main problem is that GPS is connected showing in notification even after application closed. I…
Abhishek Singh
  • 9,008
  • 5
  • 28
  • 53
4
votes
0 answers

Stop a Firebase JobDispatcher service

I have a recurring job service using Firebase JobDispatcher which will keep tracking the device GPS location. How can I stop the service so that the application will not track the location on a button click from any activity. FirebaseJobDispatcher…
dharanbro
  • 1,327
  • 4
  • 17
  • 40
3
votes
1 answer

Accurately calculate Vehicle Speed (MPH) using Android GPS Location Latitude/Longitude

Im currently attempting to develop an Android Application that displays an accurate road speed for a vehicle in Mile Per Hour (MPH) using Location Latitude/Longitude from GPS. I have the following code as my first attempt:- private fun…
Hector
  • 4,016
  • 21
  • 112
  • 211
3
votes
1 answer

Android 11: how to get current location

I want to get the current location of the device when the user clicks something. I do not need continuous updates. The FusedLocationProviderClient.getLastLocation() is not an option for me because it only returns the last location, which can be…
3
votes
2 answers

Kivy Android plyer.gps on_location Callback is Never Called

I'm writing a quick test using Kivy and Plyer to get my phone's GPS coordinates. from kivy.app import App from kivy.logger import Logger from plyer import gps def main(): app = GPSApp() app.run() class GPSApp(App): def…
That1Guy
  • 7,075
  • 4
  • 47
  • 59
3
votes
3 answers

Geofence - problem in triggering 'GEOFENCE_NOT_AVAILABLE'

I do app with geofencing use and since I started to work with it I get to broadcastReceiver the transitions and when I turned off the GPS location I got an alert with code GEOFENCE_NOT_AVAILABLE and I started a service to reregister the geofences…
3
votes
2 answers

How to handle onNotificationReceived from Firebase every 10 minutes while app is in background. Android 9.0

I need to be able to send my GPS-location to a server every time I receive a silent-push notification from Firebase. The timer for sending a notification is currently set to every 10 minutes. When the phone is charging this is not a problem, but…
3
votes
0 answers

why mobile phone gps provide sometime same coordinates on different location

Background: I am now working on an Android app to track vehicles where I required to get device location on every 10 second as on management decision. We are already developed this app which provides us updated location on time as our expected time…
Osman
  • 1,270
  • 2
  • 16
  • 40
3
votes
1 answer

Android foreground service won't stop

I've finally set up my app (tracking live GPS) to track using a foreground service. However the issue I'm running into now, is the service never stops, even after I tell it to. I keep getting logs whenever I get a new location from the location…
Nieminen
  • 1,284
  • 2
  • 13
  • 31
3
votes
1 answer

How to find battery leak in my application?

I've written an application, it's a big one and it has lots of features. But I have a problem with it: in the phone battery usage it takes about 35 percent of battery and it's a huge problem even when I don't use it very much. I've no services in…
Navid Abutorab
  • 1,667
  • 7
  • 31
  • 58
3
votes
1 answer

Location updates are not working in Device Admin / Managed Work Profile Mode

When location updates are requested with LocationManager as well as FusedLocationProviderClient, I'm unable to receive location updates in my app. So I have tried below code to allow the location updates in my app, but it is not working. manager =…
Amrut Bidri
  • 6,276
  • 6
  • 38
  • 80