How to save data from accelerometer?

I am pretty new in expo so i may have a really basic question.
I need to save the data from smartphone (android) accelerometer either on my device or online. The tutorial app is exacltly what i need [https://snack.expo.dev/]. How can I record the three axes data in json or csv file format?
Thank you