2

I'm using Push Plugin to receive notifications on a Phonegap app made for Android and iOS. The notifications are sent from a Rails app.

Is there a way to open a specific app view after clicking the notification without writing native code?

AAlvAAro
  • 56
  • 6

2 Answers2

1

It would depend on the framework you are using.

Javascript

window.history.replaceState(null, '', '/view_url/' + params);

Angular JS

$state.go('app.customView');
Ajoy
  • 1,838
  • 3
  • 30
  • 57
  • This is true when you are calling a URL from within the application, but how does this apply to the notification's tray since there's no references for window there – AAlvAAro Jul 01 '15 at 18:36
  • This code will go in your application's notification handler. As soon as you get a notification (in your application), change the window URL. – Ajoy Jul 02 '15 at 01:47
0

Yes, send extra parameter in payload from server side code Notification will trigger an event once receiving and click