Hi Kevin,<div><br></div><div>you mind sending a PR (pull request) to fix this bug?</div><div>Sorry for it, its a pretty annoying issue for sure!</div><div><br></div><div>-Matthias<span></span><br><br>On Thursday, July 30, 2015, Kelvin Lunsford &lt;<a href="mailto:kelvin@qantel.com">kelvin@qantel.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If UPS is given a push command with no &quot;badge&quot; value the IOS badge icon is being removed when the notification is received.  Expected behavior is that the badge icon would be unchanged if no badge value is set.<br>
<br>
When USP receives a push command with no &quot;badge&quot; value it is sending APNS a &quot;badge&quot; value of -1.<br>
<br>
The Apple push payload spec says the badge icon is removed if the &quot;badge&quot; value is 0, and the icon is unchanged if there is no &quot;badge&quot; value.  The spec does not say what happens if the &quot;badge&quot; value is less than zero.<br>
<br>
Tested devices are removing the badge icon when -1 is set.<br>
<br>
Please change UPS so no &quot;badge&quot; value is sent to APNS when the UPS command has no &quot;badge&quot; value.<br>
<br>
For example you could change the sendPushMessage function of APNsPushNotificationSender.java to:<br>
<br>
  PayloadBuilder builder = APNS.newPayload()<br>
    // adding recognized key values<br>
    .alertBody(message.getAlert())<br>
    //.badge(message.getBadge()) // do not set badge here<br>
    .sound(message.getSound())<br>
    .alertTitle(apns.getTitle())<br>
    .alertAction(apns.getAction())<br>
    .urlArgs(apns.getUrlArgs())<br>
    .category(apns.getActionCategory())<br>
    .localizedTitleKey(apns.getLocalizedTitleKey());<br>
<br>
  if (message.getBadge() &gt;= 0)<br>
    builder.badge(message.getBadge()); // only set badge if needed<br>
<br>
- Kelvin<br>
<br>
_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="javascript:;" onclick="_e(event, &#39;cvml&#39;, &#39;Aerogear-users@lists.jboss.org&#39;)">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
</blockquote></div><br><br>-- <br>Sent from Gmail Mobile<br>