检查是否已连接Google Fit

时间:2018-07-13 09:33:31

标签: android google-fit

我需要实现一个按钮,该按钮应启用/禁用Google Fit,但是我找不到一种方法来检查GF是否已被授权。

类似这样的东西(应用程序启动):

if(GF == enabled) 
    show "Disable GF" button
else
    show "Enable GF" button

我不想检查我是否拥有GF通话的权限,但可以检查应用程序启动的权限。 像设置一样。

GoogleSignIn.hasPermissions(GoogleSignIn.getLastSignedInAccount(this), fitnessOptions)) 

总是返回false。

0 个答案:

没有答案
相关问题