Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Longpolling notification #1059

Closed
dicoy-zz opened this issue Aug 1, 2016 · 5 comments
Closed

Longpolling notification #1059

dicoy-zz opened this issue Aug 1, 2016 · 5 comments

Comments

@dicoy-zz
Copy link

dicoy-zz commented Aug 1, 2016

I'd like to run some js, before displaying the notification.
Example:
Every Friday at 8PM my app would run an ajax request to my server to check if there's a notification to show, and if so. the ajax request would respond with the text and all the details about the notification it's supposed to show.

Would that be possible with this plugin?

@Tawpie
Copy link

Tawpie commented Aug 1, 2016

I don’t think so. When the notification fires, it’s initially handled by the OS (your app may be backgrounded or killed) and the OS will put up a notification that has the text you scheduled—then the OS will signal your app that a notification has fired. When your app is finally running you can do what you need, but the original notification in the notification tray will have had the text you specified when you scheduled it. In other words, the OS will post the scheduled text as a clue to the user that they may want to interact with your app, but this plugin isn’t intended to be a cron job. On Android you could possibly do that with a service running in the background, but to my knowledge iOS prohibits that kind of thing.

On Jul 31, 2016, at 11:18 PM, Sebastian notifications@github.com wrote:

I'd like to run some js, before displaying the notification.
Example:
Every Friday at 8PM my app would run an ajax request to my server to check if there's a notification to show, and if so. the ajax request would respond with the text and all the details about the notification it's supposed to show.

Would that be possible with this plugin?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dicoy-zz
Copy link
Author

dicoy-zz commented Aug 1, 2016

well you could reference the notification id and run an update on it right?
If that's possible, that would be enough for me

@Tawpie
Copy link

Tawpie commented Aug 1, 2016

Sure… but your app has to know what time it is so it knows to make the AJAX call doesn’t it? When it’s not actively running, that’s rather a challenge.

On Aug 1, 2016, at 8:28 AM, Sebastian notifications@github.com wrote:

well you could reference the notification id and run an update on it right?
If that's possible, that would be enough for me


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@rwillett
Copy link
Collaborator

If this is still a problem, please update with the template in #1188 otherwise please close it.

@rwillett
Copy link
Collaborator

Closed as no response from original poster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants