// Create a javascript action and try this code. This will display the toast message wherever the JSA is called.
import { ToastAndroid } from 'react-native';
export async function ShowToastMessage(message) {
// BEGIN USER CODE
if (!message) {
console.warn("ShowToastMessage called without a message!");
return false;
}
ToastAndroid.show(message, ToastAndroid.SHORT);
return true;
// END USER CODE
}
Hi,
The issue occurs because Native Toast Message widget is UI-driven, not event-driven.
When you delete the object, the page refreshes and the widget loses its context — so the toast never appears.
So the toast cannot be triggered.
In Native Mobile, toast messages must be triggered using a Nanoflow action, NOT by widget visibility.
Instead of directly deleting:
In the same Nanoflow:
This works as a toast in Native
If you still want to use the Toast widget:
Use a Nanoflow → Delete Object → Show Message instead of controlling Toast widget visibility.
This is the actual working approach used in Mendix Native apps and aligns with platform behavior.