我正在将phonegap与phonegap-plugin-push一起使用,并且尝试了该插件随附的示例,当我在应用程序打开时发送通知时,我在我的手机(Galaxy s4,Android 5.0.1)上对其进行了测试我有振动,并且消息正在index.js中提到的div卡中显示,但是我没有在状态栏上收到通知,如果应用程序在后台,我也没有在状态栏上发出通知,但我得到了振动.我想知道为什么我在状态栏上没有通知弹出窗口.我使用phonegap-plugin-push 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
我正在使用ruby发送通知
i am using ruby to send a notification
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)更多推荐
推送通知不会显示在状态栏上
发布评论