Asking for an Address using Google Actions Builder - google-assistant-sdk

I am attempting to build a Google Assistant app using Google Actions Builder(Not Dialogflow).
I am wanting to ask the user for an Address so I can then geocode this address. I have managed to get the users current location after asking for permission but I am unsure how I can get an address from the user should they decide not to use their current location.
I would hope that the user could be requested to Speak or type an address and I can then geocode this address. I have seen that in the legacy Actions SDK there was a place type. This does not seem to be available in Actions Builder.
I am unsure how to get and store a spoken address.

Related

Get user info via Google API for IP address

Is it possible to get information from user's profile via Google API? If it is possible, which API should I use?
I'm interesting in such information:
Url to the user profile
Gender (sex);
Profile photo.
Ip address wherefrom he/she login
I am getting other user information but How we can get IP address of the current session using google API ?
Currently I am giving SCOPES = "https://www.googleapis.com/auth/userinfo.email"
For getting userinfo I am using session.get('https://www.googleapis.com/userinfo/v2/me').json()
You should check out the Google+ API. Just so you know, it’s being deprecated, with a full shutdown in March.

iOS Firebase Database Security. Create New App User: Checking for Existence of Username

I have an iOS app where all user and data functionality is handled through firebase. For all required firebase functions, we have set the rights on firebase set such that they are secure (i.e., everyone can only read/write the parts of the database that are relevant to them).
Now, in the “create new user” screen of my app, obviously no user is signed in yet, but I would like to check for availability of the desired email address and username.
How can I conduct the check without making a list of all email addresses and usernames openly accessible in the database (i.e., setting the rights such that everyone can read them).
Keeping an openly accessible list of usernames in the database in my view is a security risk. On the other hand of course no user is signed in when on the “create user” screen, so I don’t know how to restrict the access.
Thanks.
There are many ways around this. Here are a couple suggestions:
Sign the user in anonymously before choosing a username. This would then give them the access you're looking for without making the data public. Then, when the user creates an account, the anonymous account can be converted, as shown in the documentation.
Use an HTTP-triggered Cloud Function, passing the username the user wants to try as a query. Inside the function, check the database for the existence of the username, and then respond to the HTTP call accordingly.
I'd probably do the former because it'll return a quicker response. Cloud Functions can take time to spin up if they haven't run for a while.

Save requested geolocation in rails with geocoder to DB

I'm working at a social network project in rails and we need to show a "map of dreams".
Technically, we want to display all our user geolocation (for security reasons, without much preciseness) at map as "dreams map" in our city).
I'm using devise for users administration and I already installed geocoder gem.
I want to know how could I save the requested (HTML5 geolocation service/functionality, I guess...) to database and display it at a map.
I've been trying a few days ago but I can only show the location if users fill their country/city fields. Note.: Our app doesn't has a Users controller.
UPDATE:
I'm getting only the reference to the entire city with IP address request from the last_sign_in_ip column. I've read that request by HTML5/geolocation with geocoder uses MAC address of the network card and it displays a more accurate location...
I need at least the neighborhood (with a pin in the map) from requested geolocation to the user.

iOS: What does CloudKit login look like to the user?

In this excellent post / answer: Anonymously Log In to an App with iCloud Apple ID there is discussion about how to retrieve an app-specific ID for a user (fetchUserRecordIDWithCompletionHandler: method on CKContainer).
Further, there is discussion about how to request additional details from the user (fetchRecordWithID:completionHandler:).
My question (I don't have a Apple Developer account) is: what do these two steps look like (if applicable) to the end-user? Specifically,
Does the initial request for the simple RecordID require user permission?
If so, what does the the prompt look like?
What does the second request (to get email address or name data, for example) look like?
Screenshots or examples of apps currently using this framework are greatly appreciated.
The call to fetchRecordWithID: doesn't actually prompt the user. The record fetched will be empty, but you can store any values you'd like on it.
If you make the current user discoverable in your container then:
Anyone with this user record ID can look up the first and last name of the user
Anyone can find this user's record if they search for one of the email addresses associated with the account
Becoming discoverable exposes information about the user to other users of that container, so CloudKit will prompt the user with an alert to make sure they want to become discoverable.
You can request discoverability permissions by calling -[CKContainer requestApplicationPermission:CKApplicationPermissionUserDiscoverability...]

Knowing if a twitter user has location enabled

I'm writing an app that posts tweets to Twitter. I'd like to offer the option of including location in the tweet, which is available via POST statuses/update using the lat and long parameters.
Here's my problem: if a twitter account hasn't turned on location tweeting via https://twitter.com/settings/account "Add a location to my Tweets", then I can send the tweet with the location info, but the location info won't appear. This is a GOOD THING for the user's security, but an annoyance for me because:
If the user hasn't turned on this feature, I shouldn't be offering it in my UI. It's a bad user experience to let the user THINK he can include location information, but then not have the information appear because of some setting outside my control.
So here's my question: Is there a way, through the twitter api, to know if a user has turned on this setting in his twitter settings? I've looked through GET users/show, but can't find anything there that mentions what I'm trying to find out.
Well after some more digging, it turns out that there's a "geo_enabled" key that is included in responses from several twitter endpoints. It's accessible from GET account/settings, of course, but it also often appears in responses to GET users/lookup and probably several other endpoints that return user data.
If "geo_enabled" is true, then the user has agreed to let location data get posted in his tweets. If it's false or doesn't appear, then I'm going to assume that the user hash't turned on this feature.

Resources