简体   繁体   English

当应用程序在后台(Titanium)时,Android 5上的推送通知未送达 - 但它确实在前台

[英]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.

相关问题 Titanium-Android-当应用程序不在前台时,推送通知失败 - Titanium - Android - Push Notifications Fail When App Is Not In Foreground 在后台运行应用程序时,未发送Android上的Apigee推送通知(Phonegap) - Apigee push notifications on Android not delivered when app in background (Phonegap) Android-通过GCM在前台/后台使用应用发送推送通知 - Android - Sending Push Notifications via GCM with app in foreground/background 使用Delphi处理应用不在前台时的Android Push通知 - Handling Android Push notifications when app is not in the foreground using Delphi 当App位于前台时,FCM推送通知将被替换 - FCM Push Notifications are replacing when App is in Foreground 当 foreground_show 设置为 false 并且我的应用程序在后台时,如何获取推送通知以显示? - How do I get push notifications to show when foreground_show is set to false and my app is in the background? Android 应用在后台无法处理 Firebase 推送通知 - Android app cannot handle Firebase push notifications when in background Android 中的推送通知仅在 PhoneGap 应用程序使用节点推送通知处于前台时才有效 - Push notifications in Android only work when PhoneGap app is in foreground using node-pushnotifications Firebase不提供已发送或发送到Android应用程序的通知的证据 - Firebase does not provide proof of the notifications been sent or delivered to the android app Android 仅当应用程序处于前台时才播放推送通知声音,但当应用程序处于后台时不播放声音 - Android Push notification sound is played only when app is in foreground but not playing sound when app is in background
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM