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

Android Emulator/Phone Google Play Services 9.8.79 return null object

I included play-services-location-8.4.0 in my android project,to fetching location coordinates, and on my android emulator/mobile play-services version is not same as I include in project (version 9.8.79), and location object return null and after…
0
votes
1 answer

How to convert to C# a code to calculate a Distance and Bearing from google maps api

When I'm using Google Maps on Android I create a method to take a point A and calculate if it is inside of an area of 1km to the point B : float[] results = new float[1]; Location.distanceBetween(centerLatitude, centerLongitude, testLatitude,…
Nathiel Barros
  • 685
  • 2
  • 11
  • 25
0
votes
2 answers

List of all my FusedLocation requests

I am using the code below to register for location updates in one activity, but how can I check if my app has registered this request (or query my active location requests) before and is still waiting for location responses, so I don't make…
0
votes
2 answers

How to implement autodetect user location in react-native

I am trying to implement automatically detect user location feature in react-native using geolocation API but if the location service is disabled, it doesn't ask user to activate it like it does in various android apps where it asks a user to…
0
votes
1 answer

Is there a way to expire a geofence once exited on android

So far online I can only find way to set the expiration of a geofence with time in millis. I would like to have a user arrive at a geofence, exit it and then the geofence would expire. but I can only find how to either set a time or set it to never…
0
votes
1 answer

Using GoogleApiClient in a Job Service using Job Scheduler API - callbacks missing

I am trying to fetch location at certain intervals of time when the app is closed and to do so I tried using the GoogleApiClient's get last known location and to trigger that using a JobService. I have implemented the ConnectionCallbacks on the…
0
votes
2 answers

Device doesn't receive location updates

I'm working on an app which needs location updates. So i followed the official tutorial and run the app on my development device. GPS is activated and everything should work, but onLocationChanged() is never called. Then I run the app on my personal…
0
votes
1 answer

How to integrate Google Location API with android Marshmallow runtime permissions system?

I am trying to get the user's location in my Activity using Google Location API. I have a button, on which if user taps, the location of the user should be retrieved and sent to the app backend. As per Google's documentation, the…
0
votes
0 answers

Google LocationServices: Location not being shown in the textView

I have a simple application with only one activity and the goal is to display the location in a TextView. This is my MainActivity: package com.example.android.gpsapp; import android.content.pm.PackageManager; import…
0
votes
0 answers

Backoff location requests in Google Play Services for Android

I am using the Google play services for android for requesting periodically the location of a user. I created a background service that requests the location of a user and saves the location in the device internal storage. So far everything…
Garytech
  • 328
  • 3
  • 6
0
votes
1 answer

Google GPS as a service works once only

I'm trying to get GPS location to run in the background by using Service. When I click the Start button, the GPS location is sent to the screen every X time interval and stops when I click the Stop button. It worked the first time I ran the project,…
ankit
  • 125
  • 4
  • 13
0
votes
1 answer

Location Object has lat lng of another city

I'm trying to develop a Simple Application which calculates the travel distance based on current Latitude and longitude. The basic problem i'm having is that sometimes the new Latitude and Longitude are far away than 3 - 2000 km. is there any thing…
Faizan Ahmed
  • 251
  • 1
  • 7
0
votes
0 answers

How to access current location using my android app

I'm trying to access my current location using this sample code ( I have already configure my API key): MapActivity: public class MapsActivityCurrentPlace extends AppCompatActivity implements OnMapReadyCallback, …
0
votes
2 answers

Getting locations near User's Location

I have an Array of longitude and latitude of landmarks. How do i calculate the distance between the landmark and the user's location to get the landmarks which are for example in a 10km radius from the user's location
pavlos
  • 547
  • 1
  • 9
  • 23
0
votes
2 answers

Found an error that GoogleApiClient is not connected yet

private final static int CONNECTION_FAILURE_RESOLUTION_REQUEST = 9000; private double currentLatitude; private double currentLongitude; private GoogleApiClient mGoogleApiClient; private LocationRequest mLocationRequest; Button btn_start; TextView…
user7615915