User Location (Latitude & Longitude) not updated quickly on Google Assistant - dialogflow-es

I'm using "DEVICE_PRECISE_LOCATION" in Dialogflow to get the user's location (latitude and longitude). But the lat long I receive are the old ones. If a user moves, the latitude and longitude I receive from Google/Dialogflow take almost half an hour to get updated.
The location of Google maps shows the updated location, but I receive the old location from Dialogflow.
How can I get the latest latitude and longitude as soon as the user moves?

The last time I tested this, it wasn't related to time of update - it was related to when the Assistant gets the precise location from a mobile device. It does not change the location while the Assistant is opened, but if you close the Assistant and re-open it, it will re-fetch the location.
In general - location services in the Assistant are poorly supported.

Related

How Should I check if someone is in a certain location when Database Updates

I'm currently trying to build something similar to Amber Alerts where whenever a database table is updated, I check if users are in a certain area.
For example, let's say a user makes a report that they found a wallet at their current location. The database is updated where a new row is created with the latitude and longitude of that report location, and then I want to check which users are in a 5 mile radius of that lat-long.
I have every user's phone number but that's about it. I am successfully able to get the location of the report (my frontend provides that in the request data to the backend) but I'm unsure on how to get the location of other users.
How would I do this?
I am using Node JS for my backend and React Native for my frontend.
Thanks!

Foursquare Venues outdated data?

The last days I spent trying around with the Foursquare Places API.
When I send a normal "search" query for venues:
https://api.foursquare.com/v2/venues/search?ll=48.03468,14.2091&client_id=<client_id>&client_secret=<client_secret>&v=20181010&radius=8000&categoryId=<a bunch of categories>
Then I often get duplicated venues (same restaurant for instance just another name for it) or venues which are not existing anymore.
Is this normal or is the reason for this that I use the "Sandbox" Account and not a bought one (like StartUp).
Another question:
The 'Opening Hours' query (/venue/id/hours) does not provide opening hours. Same reason, or is there just no data available in the Foursquare Database?

How can Google(gmail) know the flight details before departure

Recently I booked one flight from A --> B ---> C. On the day before departure, I checked with Gmail and it reminded me that the flight from A to B will be delayed for about two hours. Then I got a message from the air company to tell me that they have changed my flight from B to C into another one which is almost two hours later than my original one. It seems Google already knew my 1st flight will be delayed even before the airline company.
I'm curious what's the channel for Google to get the information? I checked with flightaware and nothing about the delay of my flight.
Google gets a lot of data from several channels. To name a few:
gmail
adsense
google crawler
google+
google chrome
google maps
Naturally there are many projects not mentioned here, developed or owned by Google. Since Google is one of the biggest companies in the IT sector, it is no wonder that their database gathered the data earlier than your notification was sent.
From your case one cannot say that Google new about the information earlier, the only thing we know is that they have sent you the notification earlier. It is quite possible that one of the employees of the flight company uses gmail. If so, then his/her mails arrive to Google's server and some automatic analyzers parse the data and then trigger the notification event. If the company was still discussing how they should communicate the delay on gmail, in the meantime Google was analyzing the gathered data and as a result sent you the notification.
You will never know the exact details unless you will start to work for Google, since Google employees will not disclose the inner information of the company to outsiders, outsiders do not have the given information. We can only guess, but we can more-or-less know that the data was gathered by Google.
Events from Gmail
When you get an email about an event like a flight, concert, or restaurant reservation, it's added to your calendar automatically. If you don't want events from Gmail on your calendar, you can delete a single event, or change your settings so that events aren't added automatically.
Note: Events from Gmail aren't available for Government accounts, accounts with data location restrictions, or Google Accounts that don't have Gmail.

Foursquare API for mobile application

Im new to foursquare api. I would like to know whether foursquare api will return the latitude and longitude of the user location(when GPS enabled), or should we use another method to get current user location.
Thanks in advance
You should get current user location reading GPS data from user device and use it when requesting Foursquare API endpoints. For an example, see https://developer.foursquare.com/docs/venues/search
As far as I know, a server API (such as Foursquare) has no means to get your current location except for Geo-IP services (not always accurate).
I have found that when using venue/search, etc. to find information, the response back to the api web call is filled with all sorts of information, including a "field" called location, that on android systems had to cast to JSONobject then you can get the lat and long of that place and distance from you if used with radius. Like above, use your gps and the development language to get that information.

J2ME Location API on the N95 - Need to open Nokia Maps to warm up GPS?

The location API only seems to work for me when I warm up the GPS by opening Nokia Maps or Google Maps.
The Google Maps app has a status balloon which shows the number of satellites and lets the user know when the connection is active, however I have not found anything in the J2ME Location API docs which specifies how to do this.
It seems like these apps are calling some function which kick-starts the GPS. Without opening them the Location API will just time out in my app.
Use LocationListener ... :)

Resources