Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Run callback when clicking of notification body #261

Closed
Papipo opened this issue Oct 26, 2015 · 3 comments
Closed

Run callback when clicking of notification body #261

Papipo opened this issue Oct 26, 2015 · 3 comments

Comments

@Papipo
Copy link

Papipo commented Oct 26, 2015

It would be nice to be able to call a function when the notification body is clicked.

I have this app with a tabbed ui, and each tab holds different media types (pics, videos, blog posts...), thus when the user gets a "new video" notification, I would like the app to just display the video instead of opening the app.

@macdonst
Copy link
Member

@Papipo when you click on a notification in the shader the app is started and your on "notification" event handler is called. Then you can look at the data in your push and just play the video. Does this not accomplish the task you want?

@Papipo
Copy link
Author

Papipo commented Oct 26, 2015

Sorry, I thought that this callback was fired when the device received the notification. Now I see that if the app is already open, the callback is called, and if the app is closed, it works as you said.

Thanks and sorry for bothering.

@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants