Messaging

Messaging.showToast

Overview

const message = String;
const optionalOptions = {timeout: Number};
dronedeployApi.Messaging.showToast(message, optionalOptions)
  .then(function(toastObj){ console.log(toastObj) });

Examples

dronedeployApi.Messaging.showToast('Example Toast');
// timeout after 5 seconds
dronedeployApi.Messaging.showToast('Example Toast', {timeout: 5000});
const neverTimeout = -1;
dronedeployApi.Messaging.showToast('Example Toast', {timeout: neverTimeout})
  .then(function(toastObj){
    // Programmatically remove a toast
    setTimeout(() => toastObj.remove(), 1000)
  });

Response

{
  // Remove the toast from the screen
  remove: Function
}

Full Example

Last updated