Google Fit O Auth fails with RESULT_CANCELED without showing permission page

我的未来我决定 提交于 2019-12-11 13:54:52

问题


Hi I have a android project where it reads certain data from application user's Google Fit profile. I faced a weird scenario as below. all the below are in debug mode and not in release mode.

1) when compiled from my own laptop oAuth successfully worked on my phone and workflow is working fine.

2) when same code is compiled from another developer's machine, after selecting the account to be used, it does not show the permission page where we need to grant permission to google fit and the protected void onActivityResult(int requestCode, int resultCode, Intent data) method is called with result code of "RESULT_CANCELED". tried numerous times with same results

3) I plugged the same phone from my laptop and pushed the same code. this time it showed the permission page in his phone and once approved, complete flow works fine.

4) then we uninstalled the app and pushed the apk compiled from the other dev's laptop and now the OAuth works fine and flow is working without issue because the permission is already granted on the google profile for the application.

the issue seems weird and any direction to solving would be appreciated.


回答1:


It seems the reason for this issue in our case is Incorrect keystores. for debug we did not used common keystores across every one and once we used one key store and register it in developer console this issue was resolved.



来源:https://stackoverflow.com/questions/37510997/google-fit-o-auth-fails-with-result-canceled-without-showing-permission-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!