Hello, I am trying to develop an application that records the heart rate data (beat by beat data) along with timestamps and stores it locally, and also has the functionality to send that file to a mobile application. I have been able to use the HRM sensor in my application and view the current heart rate; however, attempting to use the sensor_recorder_start and sensor_recorder_stop function causes my application to force close. I used the pedometer recording example by modifying it for the heart rate monitor sensor and leaving everything else the same:
bool support = false; sensor_recorder_is_supported(SENSOR_HRM, &support); if (!support) { /* HRM is not supported or cannot be recorded on the current device */ } sensor_recorder_option_h option; sensor_recorder_create_option(&option); /* 720 hours (30 days) */ sensor_recorder_option_set_int(option, SENSOR_RECORDER_OPTION_RETENTION_PERIOD, 30*24); sensor_recorder_start(SENSOR_HRM, option); sensor_recorder_stop(SENSOR_HRM);
I was wondering if you could help me understand why the application force closes, and what I could do to fix it? Ideally I want to implement it in a way that when the user presses start and the void _sensor_start_cb is invoked, the sensor_recorder_start is implemented, and when the user presses stop and the void _sensor_stop_cb is invoked, the sensor_recorder_stop is implemented. I attempted this implementation and my application force closed as well. I am developing on tizen 2.3.2 and my target device is gear fit 2. This is for a research project for George Mason University and any help would be greatly appreciated.