Retrieve Logs via Unhandled Entry Only

edited June 2022 in Android

Hello,

I am currently using the MetaMotionS sensor for a chronic activity tracking project that often require logging over extensive period of time. In some prelim testing, I confirmed that the battery is capable of continuous 50Hz accelerometer logging for over 2 weeks without recharging.

However, it occurs to me that the logger signal is also removed after battery depleted. In a typical iOS implementation, we use mbl_mw_metawearboard_create_anonymous_datasignals to create logger signals to confirm if the device is currently logging or not, and then subscribe to the signal mbl_mw_anonymous_datasignal_subscribe prior to setting up the MblMwLogDownloadHandler. In the event of complete battery depletion, data remain in the logs (as confirmed via log size API) but anonymous signals return nothing. In the event of knowing the prior recording setup, we can manually recreate a data signal for the accelerometer recordings and subscribe to that and download. But I am also curious if we could use the unhandled entry callback in the Download Handler to have a switch case scenario that automatically handles data types without subscribing to any data signals. Would this be an invalid (or non-recommended) approach for retrieving logged data?

Thank you so much.

EDIT: Sorry i realize this is in the wrong tag (Android) while the question is on iOS. I haven't gotten to the Android downloading yet but based on the documentation we also have to create anonymous route with data writing rules before executing the Logger.downloadAsync so this might apply to Android as well.

Sign In or Register to comment.