Nearby permission requested multiple times - google-nearby

Is there a way for the user's acceptance of nearby permission to only be asked ONCE? I have an app where the permission is asked every few days (seemingly) when the app is opened.
I enable it with this code (also used to enable Google sign in):
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.addApi(Nearby.MESSAGES_API)
.build();
Since nearby permission request is built into Neraby's auto management, that's the only code I was using. There's a chance that it's not actually asking for it multiple times and I'm just having a hard time separating the times it's asked after I've pushed code changes from times a few days have passed and it asks though. I've got it on multiple phones and it's a hobby project, so it's not a constant item I'm checking.

I haven't seen this happen on our devices (I work on the Nearby team at Google).
The only case I know of where the dialog will reappear is if the app is uninstalled / reinstalled, or if the app loses its permissions in Settings > Google > Nearby > [gear icon].

Related

Can you give a certain account a in app purchase for free on your google play app?

So I'm making this game in unity that I'm also publishing on google play. Now I wanted to give a free in app purchase to the first 10 people who donated to me on a different website. So then I emailed them a key, and so there's gonna be a form in the game that asks for the key and then if you submit it gets sent to my dev email.(reason why i'm not just using some file with keys is because I think it's insecure since people could find it) After I review it, then how do I give the user the IAP?
The method that I used in one of my projects was by adding certain codes to my databases on firebase And when the user puts the code you gave him, the script goes to the database and then checks if the code exists and if it does, it deletes it and gives the player the gift so he can't use it more than once.

How can I group device on discovery in Google smart home action?

I have a smart home skill already working fine with google home but when google home discovers devices for first time I want to group appliances into different rooms and relay this info back to google home. I know user can make rooms and assign appliances to them after sync event but I want to group them at the sync event so users wont need to do that from their end. Is it possible?
In your SYNC response you can return the roomHint property for each device which will provide a signal to the Assistant after discovering it.

Dialog Flow - Integration issues with Google Assistant

We are working on project using Google Home.
Details:
We have built certain intents in Dialog Flow. It has certain follow-up questions to get the parameter values, as a multi-turn dialogue. When testing using Dialog Flow, test console, I am asking
Can you help in booking a table: It prompts back with right question (Where do you want to book a table) as configured in Dialog Flow
Where do you want to book a table : I answer - "Some Restaurant". It prompts back with right question (When do you want to book a table) as configured in Dialog Flow
When do you want to book a table: I answer: "Today" . It prompts back with right question (For how many guests) as configured in Dialog Flow.
For how many guests? - I answer: "4 people." It ends the conversation, as configured in Dialog Flow.
The above conversation works perfectly fine as expected.
When I test using the integration for Google Home (using simulator with action SDK) [See how it works in Google Assistant]
Invoke the app (by using the explicit invocation - Talk to [APP NAME]) - App gets invoked with the right greeting message as configured
After that when I ask the questions as mentioned - above - app leaves the conversation? Nothing is answered back.
Not sure why this issue is happening - anything I am missing in the configuration?
Walk through your intents and make sure the 'set this intent to end conversation' is not set to enabled in Dialogflow (and if you're using a webhook not ending there). Look down at the Responses section in DF.
Start with Welcome Default intent, and then check each intent, all follow-up prompts.
For personal gmail accounts, the Web&App activity, when turned on, it automatically gets enabled.
For gsuite accounts, even when the Web&App activity turned on, it needs to be enabled by the admin of that organization. Only after when it is enabled, the simulator will behave as expected.
I think Actions straight up doesn't work for some (all?) Gsuite accounts, regardless of what permissions you set. Google knows but doesn't care. I spent weeks in an Actions support conversation on this topic and they ultimately punted me to the Gsuite team, who couldn't help. See also:
Sorry, this action is not available in simulation
Actions on Google won't respond to explicit invocations

Swift 4 & Firebase: onDisconnectRemoveValue fired when app go background

One of my company's app's requirements is a tracking system, where a user can track other nearby users when using our app. So there is a map and user's location (coordinates) will be updating to Firebase so other users can see on their map.
The most important thing is that we don't want sign out/offline users' location data on Firebase (because we want users only to be able to see online nearby users) so I use Firebase's onDisconnectRemoveValue() method to automatically remove disconnected users' data. The method worked great. BUT, if the app goes to the background (or screen is turned off), onDisconnectRemoveValue is fired too, so the data will be deleted (I don't want it to be deleted).
I searched the Internet, found this SO post.
This method is designed that way, I think I cannot do anything about it.
So my question is: If I want to remove a data on Firebase if the user is disconnected (loss internet connection OR app closed/killed), how can I do that?
Additional info: because I want users can updating their location to Firebase even if the App go to the background or device screen is off so I cannot check the connection at the client (can check, but when connection loss detected, cannot send remove data request to Firebase).

How to obtain ongoing user consent for use of location info

In my application, I'm using location information to capture the user locations.
I have the following questions:
What are the alert messages we have to provide in the application for user to show that we are going to use their location?
Can we fetch the location info in the background once the user accept that?
If user is allowed to fetch the location information let's say in the first time the application launches, do we need to provide the alerts for consecutive fetches (in next app loads)?
Thank you.
None, iOS will do this automatically.
This is the normal procedure.
iOS will bug the user as it is programmed to do.
If you assign the purpose property to your location manager instance, it will include that in the popup that asks the user for permission. See http://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/CLLocationManager/CLLocationManager.html#//apple_ref/doc/uid/TP40007125-CH3-SW30
Yes for the other two.
I'm not an iPhone programmer, but I'm an iPhone user. Every time an application has asked for access to my location information, once I say yes it never asks again and regularly uses it.
This leads me to believe that the answer to your questions is:
1) Probably the alert message is provided automatically the first time your application requests location information. I'm pretty sure they aren't relying on developers policing themselves.
2) Yes, I believe so.
3) Yes, I believe so.