Narendrasinh Dodiya
Narendrasinh Dodiya

Reputation: 325

Google Fit Custom Data Type

I am creating one Google Fit compatible App. My objective is to store Google Fit data using HistoryApi, and provide kind of Back Up- Restore functionality to user. If user buys new Android devices then he/she should be able to BackUp(sync) old data using his/her account.

I need to use Custom Data Type, as Public Data Types doesn't meet my requirements.

Everything works perfect, I am able to insert data and read data using History Api. But When I try to read data from Another Android device using same Google Account then data is not available to read there.

My problem seems similar to this Custom DataTypes not synching between devices

This statement from Google Fit Document is not clear to me.

Custom data types are not available to use in other apps. Only the app that creates a custom fitness data type can use it

source : CustomDataType

Q-1) What does it really means ? If I have an app GoogleFitDemo installed on multiple Android devices, then is it possible to sync data between this same app between multiple Android devices ?

Q-2)Is it improper way to store and backup data using Google fit ?

Update: Finally, I found that Custom Data Type can also be synced normally, same as other Public Data Types. I had the sync issue as mentioned by @Ifor. Sync functionality is still buggy. In some scenarios sync stops working, and sometimes synced data is inconsistent across multiple devices.

Upvotes: 2

Views: 1088

Answers (1)

Ifor
Ifor

Reputation: 2835

1). My understanding is that same app same account but different devices it should work. Having said that sync is notoriously slow (hours days...) and has been buggy so it may be hard to tell if you have it right or not.

2) There are better backup methods... But if the data fits in with the rest of the stuff Google Fit is about and is not too big then it's probably ok.

Upvotes: 1

Related Questions