GPX Import to Google Fit

Hi, all

I’m developing an Android tool to interface to Google Fit platform. One of the important tasks for me is to be able to import the past Location and Heart Rate date to the Google Fit.
Most of the fitness services provide GPX export, which can be used to upload to Google Fit.
So here is the tool which I designed for the personal use, but I’m happy to share.

The app is simple, you go step by step:

Use “Open” button to load the GPX file (you can open it from file system or from Dropbox, OneDrive, etc). It will load it and report the number of way points. It is now limited to 1000 points per upload, since Google Fit API can not manage large datasets in one go (I’m planning to add the splitting in the future).
Use “Clear” button to remove the Location and Heart rate data from the time range of GPX file (as obtained in a previous step).
Finally, use “Upload” button to upload the Location and Heart Rate (if exists) data to the cloud. After upload it will also check the data content in the time range.

Below is the screenshot:

Here is the link to the APK (updated 19.09.2016):

I want to see how the API behaves and debug in a limited distribution in our fine community before signing it and uploading on Play Store.
I have teste with the variations of the GPX data format from Runtastic and Sports Tracker.

The only thing that I can guarantee is that there is no Monkey Business done by the app, your credentials are not stored anywhere, your data is not uploaded anywhere else but your Google Fit account, no viruses or adware or any other stuff. Other than that no guarantees, it is a hobbyist software, it is free and ads-free.

PS: There is a single item in the menu “Delete History” which deletes the Location history for the past 5 years (might be useful :rolleyes: ).

Please let me know what you think.

GPX or TCX?

Hmmm, let me see… GPX. :slight_smile:

Thank you for letting me know. I will work on the app. Could you send me the gpx file which crashes the app?
pv dot zakharov obviously at gmail.com

Hi Pavel,
I tryed your app and I discovered that if the gpx file contains empty elevation data inside trkpt tag (like this: ) the app crash.

Cleaning up these tags the file will upoad fine.
I hope this can help you improve the app
:slight_smile:

Hi Pavel,
i have no idea about gpx files. i opened it, and saw that it could contain waypoints and the one, which my running app has created, contains pulse values too. if i use your app, did this only upload the waypoints, or are the pulse values stored at google fit too?

regards,
Ralf

Hi, Ralf,
The purpose was to import HR as well as waypoints. So in theory it should import those. However, there are variabilities in specific ways of storing HR in gpx. The only way to know for sure is to try it.
Best regards
Pavel

Hi, Tiziano,
Thank you for letting me know. I will have a look at it.
Best regards

Hi Pavel,
can you tell me, where i can find some examples/codesnippets how to upload waypoints and heartrate. I want to code a litte bit with fit api. I didn’t really understand how to use fit api. And can i combine waypoints and heartrate in one dataset? Which are the correct Datatypes for uploading this? I only found an example where Datatye.TYPE_STEP_COUNT_DELTA was used. Are Recording-API, History-API, Session-API all can use the same Datatypes? Or is Datatype depebding on API?

Regards,
Ralf

Great! did you publish the source code on github or similar? Thx

Hey, just tried this and the data doesn’t show up in my Fit app.

How long does it usually take for the data to update?