Questions tagged [google-location-services]

The google (android) specific api of location-services, which is used to determine your approximate location. Your location could be determined using data from cellular, Wi-Fi or Global Positioning System (GPS) networks.

This tag can be used in posts relating to either Google Play services location APIs or the Android framework location APIs.

234 questions
5
votes
0 answers

Is there an Apple Visits Location Service equivalent?

I'm looking to create an app for Android that checks a users location history to draw some conclusions of their daily life and identify behavioural patterns. The Visits Location Service for IOS seems perfect for this kind of work as it logs…
5
votes
1 answer

Background location updates on Android Oreo stop after 2 hours

Android 8 (Oreo) has introduced a few Background Execution and Location limits. There are 2 ways to request location updates - via a looper for foreground requests and via pending intent (ie BroadcastReceiver) for background requests. If your app…
Arturs Vancans
  • 4,531
  • 14
  • 47
  • 76
5
votes
2 answers

Geolocation Current Position API not working in IE11.5 windows10

Geolocation current position API is inconsistent in IE11 windows 10 machine. Below is the code function setCurrentPos(event, firstLoad) { navigator.geolocation.getCurrentPosition(function (position) { firstLoad…
5
votes
2 answers

How to check screen overlay detected permission in Marshmallow Devices

I have an app in which after detecting user's location the app displays nearby banks, restaurants etc. Earlier everything was working fine but after a recent update to my Moto X Play device the app asks for 'Screen overlay Detected' and just …
5
votes
1 answer

Android Service With Google Play Services Location Causing App to Open Randomly

I have a service which should capture the user's location and current battery level and send it to my firebase backend. For some reason it seems like whenever I have this service enabled in my app, my app will randomly open without any user…
4
votes
1 answer

Date Time Zone is having issue with finding ID for the location "America/Punta_Arenas"

I am getting an exception while trying to get time zone for the location "America/Punta_Arenas". I am using joda LocalDateTime. import org.joda.time.{DateTime, DateTimeZone} val timezone = DateTimeZone.forID("America/Punta_Arenas") So the above…
4
votes
1 answer

Android - Foreground is not working in Oreo. OS killed service after some interval

I have an application which is using location service in background at every 5 minute of interval. We are using Fusedlocationproviderclient in foreground service. It is working fine when app is in open. When I put application in background or swipe…
4
votes
1 answer

Android 9 ResolvableApiException onActivityResult has resultCode 0 RESULT_CANCELED

I have this weird behavior on android 9 for location tracking. Basically when I turn off high accuracy location I get ResolvableApiException which is correct, but then if I call resolvableApiException.startResolutionForResult(activity,…
Vilen
  • 5,061
  • 3
  • 28
  • 39
4
votes
0 answers

FusedLocationProviderClient requestLocationUpdates doesn't trigger LocationCallBack for API 23 above

I have run out of possible ways on how to solve this issue. I am technically using the same code that is working in API 23 and above before I made tweaks on my app. The callback (in the requestLocationUpdate) does not trigger in phones that are…
4
votes
0 answers

How can I use the firebaseJobDispatcher to receive continuous updates for location?

Level I am a beginner Task To run an android service that sends location updates (latitude, longitude) to a database periodically while a driver is driving (to track location) every 5mins. I want to update the database with location even if the app…
4
votes
1 answer

Get user's current location google api not working

hello I am using google autocomplete Places in my IOS app. But the problem is its not working. and I am unable to get a current location of the user. The search function is successfully showing places in autocomplete box but the only problem I am…
hellosheikh
  • 2,929
  • 8
  • 49
  • 115
3
votes
0 answers

Why does FusedLocationProviderClient.getCurrentLocation() always return a null object?

I am trying to get the location whenever a user clicks a button. I have the code below but the outcome of "location" always is null. I am running this on an emulator in Android Studio and whenever I check out the app info, location services are…
Tyler
  • 127
  • 3
  • 11
3
votes
3 answers

Is there a way to autofill/text complete a form field, as user types, with the first Google Location returned value?

I have a standard field in a form for location, using Google Places API.
As a user types, it shows suggestions below. Is there a setting to…
gwalshington
  • 1,418
  • 2
  • 30
  • 60
3
votes
1 answer

MVP in Android - where to place Google API calls for location services?

I am developing my first android app and since my code is quickly becoming a huge mess I decided to follow the MVP pattern. My app is divided in Views (Fragments), Presenters, and Contracts (interfaces with the methods a view and it's presenter will…
3
votes
0 answers

Why is current location different between Google Maps and the Location Services API?

The blue icon which represents the current location in the map is different from the location I get from the Location Services API. googleApiClient = new GoogleApiClient.Builder(getApplicationContext()) .addApi(LocationServices.API) …
1
2
3
15 16