How to load a custom location in Cordova+Ember when user click on system notification?

Mou

I have an app made in Cordova using Ember framework.

When I receive a system notification I want to open a custom location based on id that notification send me. Notification call a method out of Ember route/controller system.

How I can call a ember router to load a custom location based on notification id if the method are not inside Ember managed code?

Regards.

Jay

You can check Ember.Instrumentation module which can be used for such scenarios.

http://emberjs.com/api/classes/Ember.Instrumentation.html

To send an event from outside Ember:

Ember.Instrumentation.instrument("eventGroup.notificationOccured", {id: 'id_which_you_got_from_notification'});

To subscribe the event inside Ember code:

Ember.Instrumentation.subscribe("eventGroup.notificationOccured", {
      before: function(id, timestamp, payload) {
        // Here you can do routing
      },
      after: function() {}
});

The subscribe can be inside Ember App codebase where you can transitionTo the route depending on the id.

You can probably put the subscribe code snippet in your IndexRoute's setupController or inside any controller method which would have already executed whenever notification arrives.

In case you want to put the code in controller then redirection can happen via controller.transitionToRoute(routeName);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to get push notification message when the user click the App directly?

From Dev

Show notification when User go to a specific location

From Dev

Notification if user close to location

From Dev

Meteor + Cordova: getting user's location when app is terminated

From Dev

How to Show User Current Location On Zoom When View Did Load in iOS?

From Dev

how to show Custom user location programmatically

From Dev

Change State when User Selects Notification from iOS Notification Center in Cordova

From Dev

How to close notification when user clicks on it

From Dev

How to load resource from different Controller and and change it when user click in tab nav Telerik Scheduler UI?

From Dev

How to handle when a user does not allow location

From Dev

Android Push Notification - How to get notification data when you click on action button of individual push notification

From Dev

How to get jasperreport file (.JRXML) exact location to load to the system?

From Dev

Auto click a custom hyperlink when page load using jQuery

From Dev

Sticky Notification of my Custom Cordova Plugin kill when installing push plugin

From Dev

Custom System Tray Notification Qt

From Dev

How to load hasMany in Ember?

From Dev

How can i open Activity when notification click

From Dev

How to open an android activity when I click on a notification

From Dev

System load vs user load

From Dev

how to resume the application when click app icon launcher in cordova?

From Dev

Restart the application when click on notification

From Dev

update an activity when click on notification

From Dev

How to open iOS app when Push Notification custom button clicked?

From Dev

How notification system works

From Dev

When user logged out and the push notification come my app opens automatically. i want to open my app on the click of push notification?

From Dev

How To Move To Spesific Screen iOS When User Tap Notification FCM

From Dev

How can I get Firebase Notification Body when user clicks?

From Dev

android How to start activity when user clicks a notification?

From Dev

How to detect when user clears your app's notification

Related Related

  1. 1

    How to get push notification message when the user click the App directly?

  2. 2

    Show notification when User go to a specific location

  3. 3

    Notification if user close to location

  4. 4

    Meteor + Cordova: getting user's location when app is terminated

  5. 5

    How to Show User Current Location On Zoom When View Did Load in iOS?

  6. 6

    how to show Custom user location programmatically

  7. 7

    Change State when User Selects Notification from iOS Notification Center in Cordova

  8. 8

    How to close notification when user clicks on it

  9. 9

    How to load resource from different Controller and and change it when user click in tab nav Telerik Scheduler UI?

  10. 10

    How to handle when a user does not allow location

  11. 11

    Android Push Notification - How to get notification data when you click on action button of individual push notification

  12. 12

    How to get jasperreport file (.JRXML) exact location to load to the system?

  13. 13

    Auto click a custom hyperlink when page load using jQuery

  14. 14

    Sticky Notification of my Custom Cordova Plugin kill when installing push plugin

  15. 15

    Custom System Tray Notification Qt

  16. 16

    How to load hasMany in Ember?

  17. 17

    How can i open Activity when notification click

  18. 18

    How to open an android activity when I click on a notification

  19. 19

    System load vs user load

  20. 20

    how to resume the application when click app icon launcher in cordova?

  21. 21

    Restart the application when click on notification

  22. 22

    update an activity when click on notification

  23. 23

    How to open iOS app when Push Notification custom button clicked?

  24. 24

    How notification system works

  25. 25

    When user logged out and the push notification come my app opens automatically. i want to open my app on the click of push notification?

  26. 26

    How To Move To Spesific Screen iOS When User Tap Notification FCM

  27. 27

    How can I get Firebase Notification Body when user clicks?

  28. 28

    android How to start activity when user clicks a notification?

  29. 29

    How to detect when user clears your app's notification

HotTag

Archive