dtcooper / python-fitparse

Python library to parse ANT/Garmin .FIT files
http://pythonhosted.org/fitparse/
MIT License
738 stars 184 forks source link

Identify Strava apps by product/app name #131

Closed dlenski closed 1 year ago

dlenski commented 3 years ago

Recent versions of the Strava iPhone/Android app can record GPS activities in .FIT format.

This PR adds a test file from a recent run that I recorded using the Android app, and modifies profile.py so that fitdump will parse it as follows:

$ fitdump tests/files/strava-android-app-201.10-b1218918.fit | head -n100
1. file_id
 * manufacturer: strava
 * strava_product: Strava Android App
 * time_created: 2021-09-27 15:13:02
 * type: activity

2. developer_data_id
 * application_version: 1218918
 * developer_data_index: 0

...

10. device_info
 * device_manufacturer: Motorola
 * device_model: Moto X4
 * device_os_version: 8.1.0
 * manufacturer: strava
 * mobile_app_version: 201.10 (1218918)
 * strava_product: Strava Android App

A friend also gave me access to a file from the iPhone app, which fitdump parses like…

$ fitdump strava-iphone-app-178.fit | head -n100
1. file_id
 * manufacturer: strava
 * strava_product: Strava iPhone App
 * time_created: 2020-11-28 18:48:25
 * type: activity

2. developer_data_id
 * application_id: (32, 99, 111, 109, 46, 115, 116, 114, 97, 118, 97, 46, 105, 111, 115, 32)
 * application_version: 24720
 * developer_data_index: 1

…

7. device_info
 * device_manufacturer: apple
 * device_model: iPhone10,1
 * device_os_version: 14.2
 * manufacturer: strava
 * mobile_app_version: 178.0.0
 * strava_product: Strava iPhone App
dlenski commented 1 year ago

I rebased this on top of #143 to fix the CI.