我已经为推送通知实现了GcmIntentService,一切都很好,但是当升级到Android8(奥利奥)版本时,它就会在奥利奥设备上崩溃。是否有可能继续使用GcmIntentService进行推送通知。
请提前分享你的看法,谢谢
异常
java.lang.RuntimeException: Unable to start receiver com.example.PushNotificationReceiver:
java.lang.IllegalStateException: Not allowed to start service Intent {
act=com.google.and
我正在开发一个聊天应用程序,我需要知道何时收到推送通知,以便用新消息重新加载对话视图。如果用户允许应用程序向他的设备发送推送通知(带有通知对话框),那么它工作得很好。但是,如果他在此对话框中点击"No“,则不会执行以下代码,该代码将用户设备令牌注册到我的数据库:
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
// Update the OneSignal id for this curren
我这里有个问题,我真的不知道怎么解决。
我使用此代码发送推送通知:
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
if(alertView == self.alert){
if (buttonIndex == 1){
// IF accepted was pressed, sent a notification to the requester
NSMutableDictionary *params =