Questions tagged [location]

Location is a specific position in physical space, e.g. a point on the surface of the Earth described using latitude and longitude coordinates. This tag should NOT be used for questions related to the position of a virtual element e.g. position of a pixel on a bitmap or position of a layout element on UI (use [position] tag in that cases).

The term location is used to identify a point or an area in physical space, such as on the Earths surface or within a room.

A relative location is a description of position relative to another known site — for example, "2 miles north of London".

An absolute location is designated using a specific pairing of latitude and longitude in a Cartesian coordinate grid — for example, a Spherical coordinate system or an ellipsoid-based system such as the World Geodetic System—or similar methods.

The term location generally implies a relatively high degree of certainty of position.

9647 questions
27
votes
1 answer

Excessive Alarm Manager wakeups in android with Google Play Services Location

I received an performance report from Android Vital on Google Play Console about Excessive Alarm Manager wakeups: https://developer.android.com/topic/performance/vitals/wakeup.html I use Location API from Google Play Services to request for location…
poiuytrez
  • 21,330
  • 35
  • 113
  • 172
27
votes
4 answers

Detect or prevent if user uses fake location

I will block a user from using my app if they fake the location. So I use isFromMockProvider to check if the location is fake (follow here). But isFromMockProvider() may return false for faked locations in some cases. public void…
Linh
  • 57,942
  • 23
  • 262
  • 279
27
votes
4 answers

How to detect country / location of visitor?

Possible Duplicate: Location detecting techniques for IP addresses For our website it's important to know from exactly which country our visitor is coming from. I guess the best answer for my question would be the simple geo location feature of…
Lupo
  • 2,884
  • 5
  • 24
  • 30
26
votes
6 answers

nginx location 404 not found

Here are my nginx configure files. On the default.conf, the first location is used to access /usr/share/nginx/html directory, it is ok while I access http://47.91.152.99. But when I add up a new location for directory /usr/share/nginx/public…
26
votes
2 answers

Fused Location Provider setsmallestDisplacement doesn't work in Android

Hi I have implemented Fused Location provider Api for getting location updates in a service. I was able to get the onlocationchanged event fired according to the interval set. However when i set the setsmallestDisplacement to 10 metres, the event is…
hemanth kumar
  • 3,068
  • 10
  • 41
  • 64
26
votes
4 answers

Activating Network Location Provider in the Android Emulator?

Is it possible to activate the network location provider on the android emulator? Maybe with a fake cellid?
Janusz
  • 187,060
  • 113
  • 301
  • 369
26
votes
3 answers

how I can get the city name of my current position?

I'm working with android studio and in a popup dialog I want that users can get their position but all I know to do is get my latitude and longitude. This is the code import android.app.Activity; import android.content.Context; import…
Rick
  • 3,943
  • 6
  • 33
  • 45
26
votes
5 answers

How to get the user Home/Work location for a user in Android

Im developing an app that brings the user a quick list of "info" items but i want to set an options so that he receives this items as notifications when he is leaving home or work. I noticed (using google now on my device) that they can tell where…
LordSidious
  • 508
  • 5
  • 15
25
votes
6 answers

Moving Google Maps Camera to a Location

I'm working with a Google Maps View and I want to add a button to the map that when tapped, will move the camera to a specific location. I currently have a button outlet and an action connected to the button. @IBAction func locationTapped(_ sender:…
ch1maera
  • 1,369
  • 5
  • 20
  • 42
25
votes
2 answers

cannot resolve symbol 'LocationServices'

I am trying to build an android app using android studio that uses the userlocation. I am trying to import the google play services LocationServices api, but it says it can't resolve symbol 'LocationServices'. I tried searching for an answer but I…
25
votes
4 answers

How can I get continuous location updates in Android like in Google Maps?

I'm building a friend tracking android app. While my friend activated the app and goes away along with his GPS and cellular data on, I need to track him on my device. That's the concept. I've implemented LocationListener class and now I can get…
Sangeeth Nandakumar
  • 1,362
  • 1
  • 12
  • 23
25
votes
4 answers

PHP header location-redirect doesn't work - why?

Here's my file. I want to make it redirect, but nothing happens. To check out what is going on, I added an echo before the header part. It neither throws an error or redirect to index.php. What is wrong? I have turned output buffering on/off, but…
Industrial
  • 41,400
  • 69
  • 194
  • 289
25
votes
3 answers

IllegalArgumentException: provider doesn't exisit: null on Maps V1

I'm using Google Maps API V1. I have this error : java.lang.IllegalArgumentException: provider doesn't exisit: null This is my code : locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE); Criteria…
user2903095
25
votes
4 answers

android check location services enabled with play services location api

You can determine if any providers are available with LocationManager, but can it be done with the google play services location api? When nothing is enabled, in fact "access to my location" is off, all the API calls (connect(),…
user1248322
  • 723
  • 2
  • 7
  • 10
25
votes
7 answers

where is .apk location for apps that are installed on sdcard?

I know that the location for system apps is '/system/app' and the location for user apps is '/data/app'. But I can't find the location of apk for the ones that I moved to/installed on sdcard.
rohitverma
  • 767
  • 2
  • 9
  • 14