DroneDeploy
Search…
Messaging

Messaging.showToast

Overview
1
const message = String;
2
const optionalOptions = {timeout: Number};
3
dronedeployApi.Messaging.showToast(message, optionalOptions)
4
.then(function(toastObj){ console.log(toastObj) });
Copied!
Examples
1
dronedeployApi.Messaging.showToast('Example Toast');
Copied!
1
// timeout after 5 seconds
2
dronedeployApi.Messaging.showToast('Example Toast', {timeout: 5000});
Copied!
1
const neverTimeout = -1;
2
dronedeployApi.Messaging.showToast('Example Toast', {timeout: neverTimeout})
3
.then(function(toastObj){
4
// Programmatically remove a toast
5
setTimeout(() => toastObj.remove(), 1000)
6
});
Copied!
Response
1
{
2
// Remove the toast from the screen
3
remove: Function
4
}
Copied!
Copy link