how to Increment Push Notification Badges no?

0 votes

I am trying to acces the below functionality. but it is not working.

http://blogs.shephertz.com/2014/05/19/increment-push-notification-badge/

PushNotificationService pushNotificationService = App42API.BuildPushNotificationService (); // Initializing PushNotification Service. string userName = "UserName"; int badges = 10; // For clear count make it 0 pushNotificationService.UpdatePushBadgeforUser(userName, badges, new UnityCallBack());

I am using latestest SDK.

asked Jun 24, 2014 in App42 Cloud API-BaaS by marine.modi (62 points)
Can you tell me that which type of error you are having or if it is possible that share the logs details where you are finding the issue using this functionality?

Hii, hs00105

for me badge number is incremented.

for reseting the Badge valyu i tried both function

1) pushNotificationService.UpdatePushBadgeforDevice(userName, deviceToken, badges, new UnityCallBack());

2) pushNotificationService.UpdatePushBadgeforUser(userName, badges, new UnityCallBack());

 

but in this both function i am getting 

"httpErrorCode":"401", "appErrorCode":"1401", "message":"UnAuthorized Access", "details":"Client is not authorized"

plz help me i am doing any wrong.

thax

Vijay

1 Answer

0 votes

Hi,

Thanks fro sharing the details.

Let me clear that "UnAuthorized Access" exception will occur on different-2 scnerio like:

1. You have not passed the APIKey and SecretKey or you have passed the APIKey & SecretKey is not correct.

2. Your device time is not correct if your replay attack is enable under AppHQ Management Console.

Also i recommend you to follow the FAQ which will help you in some basic points.

Let me know if it helps.

Thanks.

answered Jun 24, 2014 by hs00105 (517 points)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...