Search code examples
androidgoogle-fit

Google Fit deprecation, possible to replace android API with custom REST calls?


I have an android app that leverages the Google Fit APIs on android and today I found out that they are going to be deprecated.

See the official documentation here

In the page linked above they also mention that the Fit REST APIs will remain active even if they are not suggesting to use them for android development. (they suggest the new Health Connect API instead).

Is it me or it would not be against "the rules" to call the REST api from an android app? It should be possible in practice to call the REST API from android without too much trouble. Even if the official API won't be supported anymore it shouldn't mean that I can't write my own after authenticating with OAuth in the same way I did till now.

Main reason for this is that I still need to write fitness data that's bound to the google account. The new API will only write data associated with the device.


Solution

  • the Fit REST APIs will always be there as a method for you to sync your records with the Fit Platform. But as far as "on-device" solution for synchronisation goes, Health Connect will be the option as we move forward.

    To summarise it in a giffy: 1.) Use Google Fit Rest APIs if you need to bind your health records to your Google Account 2.) Use Health Connect if you aim sharing personal health records from your apps with other apps on the Android device. (This functionality is mostly user driven, e.g. users would like to sync data from your app with other services like Samsung Health, MyFitnessPal, etc.)