Want to move to Android from iOS but don't want to loose your Apple Health data? This is a simple script to move data from Apple Health to Google Fit.
Currently migrating:
- Steps
- Distance
- Weight
sudo pip install -r requirements.txt
You need to to export your Apple Health data in XML format. Here are some clues on how to do that:
Now for the difficult part. Getting a Google Access Token.
Easiest Way:
- Got to https://developers.google.com/oauthplayground/
- Scroll down and select Fitness v1
- Select and Authorize:
- https://www.googleapis.com/auth/fitness.activity.write (for steps)
- https://www.googleapis.com/auth/fitness.body.write (for weight)
- https://www.googleapis.com/auth/fitness.location.write (for distance)
- Click on Exchange auth code for token
- Rename
config.py.example
toconfig.py
and add the access token
For more details: https://developers.google.com/fit/rest/v1/get-started
python main.py /path/to/export.xml