You can acquire sensor data locally on an Android™ device, with or without a network connection. You can use this alternative method for collecting sensor data instead of streaming it from the device to the MathWorks® Cloud. This is especially useful if you want to collect sensor data while your device does not have a network connection.
If you have Auto Upload enabled, you do not need to manually transfer sensor logs, as the logs are uploaded automatically when you have a WiFi or cellular (if selected) connection.
If you do not have Auto Upload enabled, you can manually transfer sensor logs.
Tap the menu icon and then tap Sensors.
Turn on the sensor you want to collect data from using the toggle switch.
If not already selected, tap Stream to and then select Log.
To start collecting data, tap START.
To stop collecting data, tap STOP.
In the pop-up, accept the default name for the log file, or change the name, and tap Save.
The default file name is
sensorlog followed by the date
and timestamp, for example,
this example, the first four digits are the year, followed by two digits for
the month and two digits for the day, which is June 16, 2018. The digits
after the underscore are the time in hours, minutes, and seconds, which is
10:20 and 34 seconds in this example.
The log is saved, and a visual indicator of the log appears on the sensor log button. A red number on the icon indicates how many logs you have saved. The number increments as you collect and save more logs.
Repeat these steps to collect and save more data.
Transfer sensor logs to your MATLAB® Drive™.
Auto Upload Sensor Logs
Auto Upload must be enabled. If you have a network connection on your device, the log files are automatically uploaded to MATLAB Drive. If you do not currently have a network connection, the files will automatically upload the next time the device detects a network connection (WiFi or cellular, if selected).
Manually Upload Sensor Logs
If Auto Upload is off, or if you want to re-send a sensor log, you can manually upload the file to your MATLAB Drive.
Tap Sensor Logs. Under Logs on Your Device, tap the menu on the file you want to transfer and select Upload.
While a file is uploading, a progress indicator spins next to the log name. When the upload is completed, a successful Cloud icon confirms it was uploaded to MATLAB Drive. If the file failed to upload, MATLAB Mobile™ displays a failed Cloud icon .
Logs are uploaded as MAT files to the default folder
Drive/MobileSensorData. You can change the upload folder in Sensors > More > Upload Folder. Sensor logs show automatically in your MATLAB
Drive after a successful upload.
After logs are uploaded, you can access them in MATLAB Online™, or any product that connects to MATLAB Drive.
Mobile, go to the default folder, and use the
to see the sensor data.
To delete sensor logs from your mobile device, delete them from the Sensor Logs screen:
Tap the three dots icon next to the log you want to delete.
To delete log files from your MATLAB Drive, see Delete Files (MATLAB Mobile for Android).