The end result
After a push is received and you tap the notification in the notification bar, the app opens and you see the successfulPush DIV. There you have a button to return you to the AppBody DIV. Works just fine.
As explained, this is only one possible approach. You can do whatever you want...
If you will take a look at the sample Worklight project for Push Notifications, you can see the following in common\js\main.js:
This function tells the application to display 3 alerts, telling us that:
Instead of the above, or in addition, you could - depending on your method of multi-page navigation in your app - to navigate to another "page".
You can take a look at:
Here is a small example.
These are the modifications I did to the Push Notifications sample project:
common\css\main.css
Added a successfulPush ID
common\index.html
Added an additional DIV:
common\js\main.js
Modified the following function:
Also binding the 'back' button in
wlCommonInit
:The end result
After a push is received and you tap the notification in the notification bar, the app opens and you see the successfulPush DIV. There you have a button to return you to the AppBody DIV. Works just fine.
As explained, this is only one possible approach. You can do whatever you want...