push notification doesn't show up on status bar

前端 未结 2 1523
温柔的废话
温柔的废话 2021-01-23 01:09

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 notifica

2条回答
  •  时光取名叫无心
    2021-01-23 01:46

    @Del

    i am using ruby to send a notification

    require 'rubygems'
    require 'pushmeup'
    
    GCM.host = 'https://android.googleapis.com/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)
    

提交回复
热议问题