Start a new topic

Get the current location

For a "poll" app: is it possible to send along the location (lat/long) in the request?


You might be able to resolve the location from the IP on your service. I don't think the device has a GPS reciever.

You don't need a GPS receiver to get the location, Google does this pretty well. ;) Usually the device which you use to set up the apps, does have a location enabled, so perhaps I could use that (same as the built-in Weather app)? Thing is: I can't see how... ?

PS: the LaMetric team isn't very active here, are they? :( C'mon guys, support the devs! :)


The phone you use to set up the LaMetric device probably gets the location from its built-in location services, but I doubt the LaMetric cloud service would send that data along as part of the data request for security reasons. Perhaps they'll update their app model in the future to allow apps to request certain permissions (like location). For now you might be able to use the requesting IP against a GeoIP database in your own cloud service. That is assuming that update requests are made by the LaMetric device itself, and not by their cloud service.

Ok, fair enough. Thanks for the answers, I'll go the GeoIP route then!


You'll have to confirm that the request comes directly from the client device, otherwise you'll just get the location of the LaMetric datacenter.
Login or Signup to post a comment