[TIMOB-20578] Windows: Support Notifications sent while in background
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-25T00:37:10.000+0000 |
Affected Version/s | Release 5.4.0 |
Fix Version/s | Release 5.4.0 |
Components | Windows |
Labels | n/a |
Reporter | Jörgen Buder |
Assignee | Kota Iguchi |
Created | 2016-03-16T12:34:47.000+0000 |
Updated | 2018-08-06T17:49:20.000+0000 |
Description
I looked at the parity API list form the nightly builds and I am not able to find any way to receive push notifications to a windows phone app, this is a much needed component to be able to increase usage and alert users of the app state and things to take action against.
(I was also not able to find any local notifications to use as work around)
This is needed in Windows Phone 8.1 and should be compatible with Win 10 mob ..
Much appreciated...;)
Similar to http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Android.Notification https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj676791.aspx
quick comment on this. I am talking about push notifications. not the local ones found in android. you should compare it with APN in iOS and GCM in android. ...
so in fact not only as your link as it needs a callback to receive the GCM as well on android.. in iOS it is auto generated in windows I do not know yet...
So anyone have any update on this for the 5.3.0 release of Windows SDK? Some sort of notification system have to be in place, like the local notification OR the push notification.. Thanks
Or simply it needs to be possible to create native modules with Windows target
https://github.com/appcelerator/titanium_mobile_windows/pull/635
Hi Just a quick note, so this support goal is to be able to create notifications either from local or from push, NOTE that in my case I have to be able to do this from the backgrund service that I am trying to test now, so from my perceptive it feels like I have to create this notification in the native code then. On the other side (TI foreground app) I have to be able to create local notifications and preferably receive push notifications... Not sure tat makes sense but anyway...
I read your docs in the github PR, so if the push indeed works from the app perspective then it resolves "part" of the notification need in my background service (I wills till need to make local notifications though) but the over all push can push notification to the app.. this is good, I guess this is not yet merged..
[~buder] Do you consider specific Windows API to be used for push notification? Current PR is is only for Windows raw notification but there could be broader alternatives there. Actual use case and Windows API class name (or 3rd party libraries?) would be very helpful to define Titanium background service API spec.
Hi So I read about raw notifications here : https://msdn.microsoft.com/en-us/library/windows/apps/hh761463.aspx which sounds like something useful, but as far as I can see it does not create a notification in the top notification bar. Is it correct to assume that in windows, (like in Android) I have to crate a toast notification to alert the user that there is something going on? It sound like it reading the guide above. Please confirm if I am correct? Ideally the push notification would create that for us but I know Andorra is not working like that. With your implementation of the push notification I can receive a push in a native callback handler, correct? Then I can pull HTTP and create a toast notification form there that alerts the user to "enter" the app. I take it that a notification in the top bar in Windows Phone 8.1 (and 10) will indeed lead you to the app. This is a doable scenario however if there is NO OTHER way to create notifications in the Ti context maybe you should support toast notifications so that app can create notification in the top bar? I know some apps use this and set a art date and time top alert the user about upcoming notifications for instance. Is the toast notification in windows equivalent to local notification in Android ? I hope I was clear here. Is this push notification currently in the nightly builds? I have prepared for it... thanks
What's bad thing for MS docs are that it's very difficult to find valuable content from them :( I have confirmed that in order to show toast notification, you can use [ToastNotification](https://msdn.microsoft.com/library/windows/apps/br208641) that can be invoked from
BackgroundServiceTask::Run
. For more examples check out [ToastNotification Examples ](https://msdn.microsoft.com/library/windows/apps/br208641) or [Alarm toast notifications sample](https://code.msdn.microsoft.com/windowsapps/Alarm-toast-notifications-fe81fc74) etc.I think PR 635 will be not included in the tonight's nightly build. I have some more things to do for it. maybe ready tomorrow's build.
Ok got it, thanks, let me know when it is :)
This PR is already merged in master and should be ready in the current nightly build.
Hi I noted the callback native handler you added to support push notifications a while back, and I have had not time to test it, but carting a module with the latest SDK 20160511 there is no extension in the manifest that corresponds to a hook in the module? You specified it like this:
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.