Hello
I am creating local notification.Whenever i setup my timer it pop up's alert correctly at right time.But it opens same page where i have done setup of the notification.For eg. , It will open "notification.js" file which is creating notifications.But i want to open some other page like 'info.js' on click of 'OK' button.I have spent so many hours but no solution yet.My code is:-
var notification = Ti.App.iOS.scheduleLocalNotification({ alertBody:"Breakpal was put in background", alertAction:"ok", sound:"hello4.mp3", date:new Date(new Date().getTime() + 3000) // 3 seconds after backgrounding });
Thank you.
1 Answer
When you click the ok button on a local notification, all that does is bring the background application to the foreground. That means it will display the last page that you were on when you left the app. If you want to move to a different page, you can listen for the resume event and handle accordingly. For instance, if you want to show the info tab on resume, then programmatically switch tabs in the resume event listener.
Your Answer
Think you can help? Login to answer this question!