Repeated of Previous Toast Notification on Android

You must Login before you can answer or comment on any questions.

Window1
 
Titanium.App.addEventListener('submit',function(data){
  var toast = Ti.UI.createNotification({message: data.msg});
  toast.duration = Ti.UI.NOTIFICATION_DURATION_LONG;
  toast.show(); 
});
 
window2
Titanium.App.fireEvent('submit', {msg:'test1'});
The issue is each time I called the event 'submit', it will show the previous toast notifications too. For example, it i have called with the parameter 'test1' the first time, then 'test2' the second time, 'test3' the third time, on the second time, the notification will shows test1 and test2, and the third time the notification will shows test1 then test2 and finally test3. May I know how to prevent the notification of showing previous message? What is wrong here? Ti 1.6.1, Android 2.2

— asked 2 years ago by David Lee
0 Comments

Your Answer

Think you can help? Login to answer this question!