Restart or reboot MetaWear device

Is there a way to restart the device and clear all the data on the device ?

Comments

  • what platform are you developing on?
  • Hi @Eric, thanks for the response. I am trying it on Android.
  • Hi @Eric, is it possible to clear data without rebooting the device ? I want to clear all the data after establishing the connection, since resetDevice restarts the device connection will be lost which doesn't make sense for my usecase.
  • what do you mean by clear data?
  • Hi @Eric, my issue is after connecting to the device I am receiving sensor data even without enabling it. Basically this issue appears if I disconnect the device without stopping sensor read and again reconnect to the device. So I want to reset all these sensors after connecting to the device.
  • Every "enable*" and "start*" function has a corresponding "disable*" and "stop*" function respectively.  All you have to do is call the inverse functions of the enabled sensors.
  • Thanks @Eric, I am calling the above inverse functions when the user exits the app gracefully. In case if user kills the app abruptly or if app crashes due to some fatal exceptions, I won't be able to call stop methods. So if there are any methods which can reset all these sensors, then I can call them right after connection is established.
  • You can still call them after your re-establish connection.
  • Hi @Eric, I won't be having tickerId to send the stop command. Is there a way to stop these sensors without tickerId ? Below is the command I am sending to stop the sensors.

    OC04<tickerId>
  • Sorry, I'm not sure what that piece of code means or how it is related to the Android API.
This discussion has been closed.