Hi, we're using the PHP library and want to programatically send a silent notification that just sends sets a badge counter for our application; but it seems we must specificy a notification text (causing the notification to show) in order for the notification to be delivered? How can we only send the badge data? This is what we try, which works on iOS but not Android:

$response = $airship->push()
array("ios"=>P\ios(null, $badges, null, false, null, null), "android"=>P\android(null,null,null,null,null,array("badges" => $badges)))))
->setDeviceTypes(P\deviceTypes('ios', 'android'))


Didn't find what you were looking for?

New post


1 comment

  • Hi Peder,

    I see that you were able to resolve your issue via the ticket you opened up with us, but I will repost the answer Martin gave in case anyone has a similar question in the future:

    "Sending a blank string in the alert should allow the silent message to be sent, however, as the goal of a silent notification is to send data to a device, you should add an "extra" key/value pair with some useful data."

    Please feel free to reach out on the ticket you opened if you have any other questions or concerns. 

    Comment actions Permalink

Please sign in to leave a comment.