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
61
votes
10 answers

Is 'constructor LocationRequest()' deprecated in google maps v2?

I stumbled upon this message recently, and I was pretty sure that this constructor wasn't deprecated in prior versions to 18.0.0, but I cannot find information anywhere that this one has been deprecated either. And what should we use instead, is…
27
votes
5 answers

LocationCallback not getting called

I am making a location request using FusedLocationProviderClient. I have kept a timer for 30 seconds to check if location is received within that timeframe. Code is below: public void requestLocationUpdates() { initializeLocationRequest(); …
16
votes
1 answer

What is the difference LocationListener LocationCallback?

I have been looking at and playing with the FusedLocationProviderApi. That class contains these two methods: PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request, LocationCallback callback, Looper…
f470071
  • 1,527
  • 3
  • 18
  • 30
13
votes
4 answers

How to get current location on flutter sdk 1.2.1

How can i get current location on android device using flutter. I have tried both Location and GeoLocator plugins the GeoLocator 3.0.0 shows this error on debuging: Launching lib\main.dart on Android SDK built for x86 in debug mode... FAILURE:…
13
votes
1 answer

How can location updates from FusedLocationProviderClient be processed with Work Manager?

First of all, I'm a total Android noob. Have looked for solutions for some time now, but can't find any helpful hints in the right direction so far. This might be generally caused by the nature of the issue itself, being quite niche. The working…
12
votes
4 answers

GPS Location Fluctuating

I am drawing heart as a polyline on Google Map depends on radius(1 - 100 meter). Once heart is drawn, user needs to walk on that heart border and need to finish from starting to end (Walking start from bottom then left then right and then bottom…
10
votes
2 answers

Getting RESOLUTION_REQUIRED always even if user press the 'OK" button in the case of checking location settings

My LocationRequest is set to PRIORITY_HIGH_ACCURACY. But in xiaomi redmi note 5 device if i press the ok button in the location settings dialog it always returns 0 through onActivityResult() method and i get…
Shadman Sakib
  • 219
  • 2
  • 10
9
votes
2 answers

Avoiding Google's prompt when trying to get location

I am developing a simple app using Flutter's location plugin, with some code based on their sample code: var location = new Location(); try { _currentLocation = await location.getLocation(); } on PlatformException catch (e) { if (e.code ==…
anol
  • 8,264
  • 3
  • 34
  • 78
9
votes
3 answers

how to change the location mode to "high accuracy/battery saving" form it default mode(device only)

I'm trying to implement a google map for getting current location using this tutorial android google map tutorial The problem is ,It is not getting my current location untill I have started my device's google map and grant permission to access…
user7462841
7
votes
1 answer

Geofences randomly fail to trigger until another GPS app is opened

I have been testing an app for many months which uses the Android Geofencing API to track enter/exit events. It works flawlessly about 99% of the time, but there are random times when the geofences simply do not trigger. This cannot be an issue…
7
votes
5 answers

Location Updates using google play services and FusedLocationProviderClient

I want to get location updates on a "background service" using latest fused location provider client.I don't want to use the location listeners and Google API Client that all are using. I also need to use location settings Api provided by google…
6
votes
1 answer

How to do geofencing when app is unresponsive

The new Geofencing API from Google is not triggering any of the events when the app is dead. I tried using PendingIntent.getBroadcast() and PendingIntent.getService() but only being able to get the transition events when the app is opened. I…
6
votes
0 answers

LocationSettingsStatusCodes.RESOLUTION_REQUIRED

I'm using FusedLocationAPI it is working properly but when user disabled location i'm using SettingsApi to show dialog to user to enable location. In marshmallow and above devices it is working fine but in kitkat if location is enabled or disabled,…
6
votes
1 answer

Warning message while updating apk in playstore

I have one version of my app uploaded on playstore.I have to upload updated version of the app which now has location based services(fused location),hence i have permission check for Location. While uploading google play shows a warning. ! New…
6
votes
5 answers

Cannot resolve symbol 'LocationRequest' Android project

I'm new on Android programming, I try to use the new Location Service for getting the user position, to do this i follow the official android developer guide but I don't understand why I'm not able to import LocationRequest in my fragment class.…
1
2 3
15 16