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 ensure requestLocationUpdates always gets a location?

i'm working with android's location manager, and i notice that when I try to use requestLocationUpdates right after I turn on GPS, it gives a null location. how do i ensure I always get a valid location when i call requestlocationupdates? my code…
broshen
  • 45
  • 3
2
votes
1 answer

Using USB GPS on android device without builtin GPS; Equivalent of gpsd

I am developing an app for android 4.4 device. These do not have built in GPS. I am planning to use USB GPS (globalsat BU353-S4). I was looking for the Android equivalent of the gpsd library available in Linux. Though I could see few apps (You are…
Suresh
  • 925
  • 1
  • 9
  • 23
2
votes
1 answer

onLocationChanged Fires Multiple Time and Causes Stackoverflows

OnLocationChanged keeps firing multiple times and causes stack overflow. Here is the imports: import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.maps.*;…
user914425
  • 16,303
  • 4
  • 30
  • 41
2
votes
2 answers

Unable to add marker on map in Android

I am getting this exception while starting the mapActivity. GooglePlayServicesUtil: Google Play services out of date. Requires 8298000 but found 6599036 and App Crashes at following line. final Marker marker = mMap.addMarker(new…
Usman Ishrat
  • 147
  • 1
  • 7
1
vote
0 answers

FusedLocationProviderClient doesn't work with PRIORITY_BALANCED_POWER_ACCURACY (no satellites), only with PRIORITY_HIGH_ACCURACY

Previously in my app I have been using PRIORITY_HIGH_ACCURACY for FusedLocationProviderClient: private fun getLocationRequest(): LocationRequest = LocationRequest.Builder(prefsManager.getLocationFrequency).apply { …
1
vote
1 answer

Rotating Emulator Window while replaying Location Routes

ive noticed that the window of my Android Emulator will rotate while im replaying a route from the Emulator Menu. The window rotation matches the bearing of the GPS signal. Ive confirmed this is happening with all of the emulators that are custom…
1
vote
0 answers

Android Location drift - analyze if user is moving or it is a simple GPS drift

So I'm using HIGH_ACCURACY to retrieve location data from my phone using FusedLocation solution. I'm already checking accuracy of this data and speed, but what I want to achieve is to understand if user is actually moving OR is it a location…
MaaAn13
  • 264
  • 5
  • 24
  • 54
1
vote
0 answers

Is there a way in Flutter, to detect whether my Application is added to the Power Saving Mode / Ultra Power Saving Mode in Android?

We are developing a GPS live tracking application for a company through Flutter. We understand that even if added to run as a background service, Chinese Roms, kill the applications when added to the battery saver mode. If we can detect if our app…
Ash XD
  • 11
  • 1
1
vote
0 answers

MapBox location.speed is always 0

I have the following problem. I receive in my LocationChangeListeningCallback latitude and longitude but getting the speed is not possible. It is always 0. Here is my code (I hope I have not omitted anything). AndroidManidest.xml
Bernd
  • 593
  • 2
  • 8
  • 31
1
vote
0 answers

Speed of a vehicle using GPS provider in android latest version not working

How to get the speed of a vehicle using your phone when we seated in the vehicle using GPS in Android latest version. I have used the GPS_PROVIDER location.getSpeed() and its not working. I have used the below mentioned code which is not working…
1
vote
2 answers

How can i find City name from Longitude and Latitude Kotlin

In kotlin how do I get the city name of the current location from which I get the latitude and longitude values?
1
vote
1 answer

What Is The Best Approach To Get Location In Android App? Foreground Or Background?

I'm trying to make an Android app that gets (and saves) GPS coordinates every time a questionnaire form on the app is completed and the Save button is pressed (noting the GPS location part is not shown). Minimum device platform requirement is Oreo…
1
vote
0 answers

Can i use this dart funtion to calculate the distance route and time

Good day to you programmer! As i have dart code for driver to update realtime location in firebase Firestone is there is a way so using user current location and database location i will find minimum time and distance and route for user end. …
1
vote
1 answer

How to fetch data from SendLocationEvent in background locator

I am building application which needs to track user trajectories to detect if user has a pattern . I am using flutter and Carp background location which is built around another package that is called background locator . background locator tracks…
1
vote
0 answers

Best practice for dealing with geolocation in offline mode

I have developed a mobile application allowing field agents to collect data based on geolocation. Each agent is assigned to a specific point of sale where he has to go, and when he arrives, he has to point out his presence in this point of sale…
Christian LSANGOLA
  • 2,947
  • 4
  • 22
  • 36