简体   繁体   English

我们需要Google Fit API的Google Fit应用程序吗?

[英]Do we need Google Fit App for Google Fit API?

I made small test app which shows daily steps using Google Fit API. 我制作了一个小型测试应用,该应用显示了使用Google Fit API的日常步骤。 During testing, I was not getting any steps count. 在测试期间,我没有得到任何步骤。 But later I realised that my Samsung S5 doesn't come's with Google Fit app so I downloaded it and after feeding some data then I tested my app again and Now I can see my steps count on my test app. 但是后来我意识到我的Samsung S5并不附带Google Fit应用程序,因此我下载了它,并在提供了一些数据之后再次测试了我的应用程序,现在我可以在我的测试应用程序上看到自己的步数了。

So Does this means that in order to use Google Fit API all my app users must have installed Google Fit App? 那么,这是否意味着要使用Google Fit API,我所有的应用程序用户都必须已安装Google Fit App?

While the Google Fit app does automatically collect some information for you (such as steps, current activity) throughout the day, it should not be assumed that it is installed . 虽然Google Fit应用会全天为您自动收集一些信息(例如步骤,当前活动), 但不应假定已安装该信息 In fact, for any kind of data you wish to show in your app using the Google Fit API, you should use the Recording API to record the data yourself. 实际上,对于希望使用Google Fit API在应用中显示的任何类型的数据,您都应该使用Recording API自己记录数据。

In the background, the Google Fit API will dedup any identical requests across multiple apps (ie, if your app and the Google Fit app are both installed and both record steps, it won't cost double the battery life). 在后台,Google Fit API将重复处理多个应用程序中的所有相同请求(即,如果您的应用程序和Google Fit应用程序都已安装并且都记录了步骤,则不会花费两倍的电池寿命)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM