android - Goto particular path when push notification arrives (Angular, Ionic, ngcordova) -


consider scenario. have ionic / angular app , using the ngcordova plugin push notifications. let push notification arrives when app in background. user, views notification in app drawer , clicks notification further information. user navigate particular path using $location.path(). how can tap notification click event?

ok. turns out there no need tap notification click event. check if app in foreground using:

notification.foreground 

so, if

if(notification.foreground) {   //do case user using app.   $popup('a notification arrived'); } else {   //do case user not using app.   $location.path('/tab/somepage'); } 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -