[英]Push notifications on Android 5 not delivered when app in background (Titanium) - But it does in foreground
I am using Urban Airship on Android to receive notifications. 我在Android上使用Urban Airship接收通知。 The Appcelerator Module IS QUITE OLD (3 years ago) https://github.com/appcelerator-modules/ti.urbanairship and I'm using this fork: https://github.com/rdking/ti.urbanairship/tree/master/android .
Appcelerator模块是陈旧的(3年前) https://github.com/appcelerator-modules/ti.urbanairship我正在使用这个分支: https : //github.com/rdking/ti.urbanairship/tree/主人/安卓 。
With rdking version I'm able to get notifications on Android 5, but only when the app is opened (foreground). 使用rdking版本,我可以在Android 5上收到通知,但仅在应用程序打开时(前台)。 If I open another app or close it (put it on background), it will not get it.
如果我打开另一个应用程序或关闭它(把它放在背景上),它将无法获得它。
I'm using Titanium SDK 5.1.2.GA (both app and module), building the module with NDK r10e
and 我正在使用Titanium SDK 5.1.2.GA(应用程序和模块),使用NDK
r10e
构建模块
platforms/android-13 and add-ons/addon-google_apis-google-13 平台/ android-13和附加组件/ addon-google_apis-google-13
(Not sure which version I should use and if is something wrong on it.) (不确定我应该使用哪个版本以及它是否有问题。)
I think I'm missing maybe some configuration on Android Manifest. 我想我可能缺少Android Manifest上的一些配置。 Notifications are working perfectly on Android < 4 and iOS.
通知在Android <4和iOS上完美运行。
Thanks in advance =) 在此先感谢=)
I recently talked with a rep at UA and they advised me they no longer officially support Titanium. 我最近和UA的一位代表谈过,他们告诉我他们不再正式支持Titanium。 I am using 5.2.0GA to run on Android M devices and UA does not work on all.
我使用5.2.0GA在Android M设备上运行,而UA并不适用于所有设备。 I am currently in the process of switching to Appcelerator's Arrow system for notifications.
我目前正在切换到Appcelerator的Arrow系统进行通知。 So far it is running smoothly.
到目前为止它运行顺利。 They use their own module called Ti.CloudPush for android.
他们使用自己的模块Ti.CloudPush for android。 I would recommend checking it out.
我建议检查一下。
更新:Urban Airship现在提供钛模块
Urban Airship module has issues with Android Lollipop and higher. Urban Airship模块与Android Lollipop及更高版本存在问题。 The module is not updated and there is no assurance when it will be so.
该模块未更新,无法保证何时会如此。 Switching for Appcelerator's Arrow system for notifications and using Ti.CloudPush module is the best idea at this moment.
此时切换Appcelerator的Arrow系统进行通知并使用Ti.CloudPush模块是最好的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.