I have a Garmin watch (Forerunner 25) which I use to connect with Garmin connect (Android app). For many reasons I would like to build my own custom app to track training. But I have not been able to do the following:
- Connect android app with a bluetooth (Garmin) Watch for file transfer.
- Retrieve a .fit file from the Watch via Bluetooth.
How would I be able to do this?
I have tried to connect the watch via a BluetoothSocket but have had no luck to connect it.
UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); //Standard SerialPortService ID
mSocket = mDevice.createRfcommSocketToServiceRecord(uuid);
mSocket.connect();
//Never reaches this part, the connection is unsuccessful
mOutputStream = mSocket.getOutputStream();
mInputStream = mSocket.getInputStream();
Not sure If any of this is correct but this is what I started with.
//Note: The device is not null before I try to connect.
// I can retrieve the name, the address ...
D/BluetoothUtils: isSocketAllowedBySecurityPolicy start : device null
W/BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
I know the .fit file is a bytefile so if anyone know how to convert it to a .csv file with all the information as: time, speed, length, elevation...
I have found the Fitparser for python but not anything for Android.
- Is there any library for this?
- Or how could I parse a .fit (bytefile) to .csv on my own?