Nearby permission requested multiple times

时间:2018-04-18 17:48:30

标签: 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.

1 个答案:

答案 0 :(得分:0)

我的设备上没有发现这种情况(我在Google的附近团队工作)。

我知道对话框重新出现的唯一情况是,如果应用程序已卸载/重新安装,或者应用程序在“设置”中失去了权限> Google>附近的> [齿轮图标]。