0

we need iphone to increase the badge numeric value on push notification arrival without initializing the application. f.e. a notification with a badge values of 1 arrives and is shown on the app icon. then another notification with badge value of 2 arrives. 2 replaces 1 on the badge, but we would like to make it 1+2=3. is a server side work around is the only way to deal with this issue? thanks!

atarno
  • 329
  • 1
  • 3
  • 14

3 Answers3

2

Yes, server side work around is the only way..

What value you will send from server will be set to the icon.

Adil Soomro
  • 37,609
  • 9
  • 103
  • 153
2

what ever value you are sending to app, that value will be displayed on top of App Icon, either the value may be 4 or 90 or 100.. if you want to do like 1+2=3, just increment the badge number dynamically i.e Present badge number = Present badge number+2;

Charan
  • 4,940
  • 3
  • 26
  • 43
  • the application isn't running when a notification arrives to the handset and the badge value is updated. – atarno Apr 19 '12 at 09:00
  • why application is not running? – Charan Apr 19 '12 at 09:06
  • 'cos you can close the application, but this doesn't mean an external push notification won't arrive. the badge is updated even if you choose not to open an application. – atarno Apr 19 '12 at 09:12
0

just pass "badge:+2" to APP , the number increased

adali
  • 5,977
  • 2
  • 33
  • 40
  • i use javapns library to submit push notification to apn. unfortunately the only badge related method i can find there is addBadge(int). have you done this editing json or something? – atarno Apr 19 '12 at 08:46
  • can you modify the javapns code? you must edit the payload to app as "+2" to work – adali Apr 19 '12 at 08:48
  • urbanairship.com look at this site , and test on it, you can edit payload yourself , just have a test – adali Apr 19 '12 at 08:54
  • urbanairship runs their own notification network, they are not related to apn, aren't them? – atarno Apr 19 '12 at 09:01
  • i mean that you test the payload if it is possible to add the number of badge count , if count you should modify the code of javanps :) – adali Apr 19 '12 at 09:04
  • i manged a way to replace a badge value in the json itself, but this doesn't work. notifications with "+n" style badges do nothing on device. – atarno Apr 19 '12 at 10:56