remove method

  1. @override
Future<void> remove()
override

Remove a study from this SmartphoneDeploymentController.

This entails:

  • stopping data sampling
  • closing the data manager (e.g., flushing data to a file)
  • erasing any locally cached deployment information

Note that only cached deployment information is deleted. Any data sampled from this deployment will remain on the phone.

If the same deployment is deployed again, it will start on a fresh start and not use old deployment information. This means, for example, that any OneTimeTrigger will trigger again, since it is considered to be a new deployment.

Implementation

@override
Future<void> remove() async {
  info('$runtimeType - Removing deployment from this smartphone...');
  executor?.stop();
  await dataManager?.close();

  await eraseDeployment();
  await super.remove();
}