Commit 06dc8cc5 authored by Mikhail Benediktovich's avatar Mikhail Benediktovich
Browse files

error callback for setApplicationIconBadgeNumber

parent 69fc815b
Loading
Loading
Loading
Loading
+2 −2
Changes for README.md: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ In this example, be sure and substitute your own senderID. Get your senderID by
		}
	  
		if (event.badge) {
			pushNotification.setApplicationIconBadgeNumber(successHandler, event.badge);
			pushNotification.setApplicationIconBadgeNumber(successHandler, errorHandler, event.badge);
		}
	}

@@ -284,7 +284,7 @@ For the above to work, make sure the content for your home page is wrapped in an
#### setApplicationIconBadgeNumber (iOS only)
set the badge count visible when the app is not running
	
	pushNotification.setApplicationIconBadgeNumber(successCallback, badgeCount);
	pushNotification.setApplicationIconBadgeNumber(successCallback, errorCallback, badgeCount);

**badgeCount** -  an integer indicating what number should show up in the badge. Passing 0 will clear the badge.

+1 −1
Changes for www/PushNotification.js: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ PushNotification.prototype.unregister = function(successCallback, errorCallback)
 
 
// Call this to set the application icon badge
PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, badge) {
PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, errorCallback, badge) {
    if (errorCallback == null) { errorCallback = function() {}}

    if (typeof errorCallback != "function")  {