推通知不会显示在状态栏

编程入门 行业动态 更新时间:2024-10-25 16:18:31
本文介绍了推通知不会显示在状态栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我使用的PhoneGap PhoneGap的带-plugin的推动,我试图自带的插件的例子,我测试了我的电话(银河S4的Andr​​oid 5.0.1),当我发送通知,而应用是我得到了振动和消息表示作为index.js提及,但我得到了状态栏的任何通知,如果应用程序在后台我也得到了状态栏任何通知,但我得到了振动卡DIV中。我不知道为什么我对状态栏的任何通知弹出。我使用的PhoneGap-插件推1.4.4

i'm using phonegap with phonegap-plugin-push , and i tried the example that comes with the plugin , i tested it on my phone ( Galaxy s4 , Android 5.0.1 ) , when i send notification while application is on i got vibration and the message is showing inside the cards div as mentioned in index.js but i got no notification on status bar , if the application is on background i got also no notification on status bar but i got vibration. i wonder why i have no notification popup on status bar. i use phonegap-plugin-push 1.4.4

推荐答案

@Del

我使用红宝石发送通知

require 'rubygems' require 'pushmeup' GCM.host = 'android.googleapis/gcm/send' GCM.format = :json GCM.key = "key" destination = ["id"] data = {:title => "PhoneGap Push",:message => "PhoneGap Build rocks!", :msgcnt => "1", :soundname => "beep.wav"} options = {:collapse_key => "placar_score_global", :time_to_live => 3600, :delay_while_idle => false} GCM.send_notification( destination, data, options)

更多推荐

推通知不会显示在状态栏

本文发布于:2023-11-27 12:06:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1638004.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:状态栏   通知

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!