I'm building a messaging app as a Universal Windows 8.1 Store Project and I'm a bit puzzled with the push notification system. I'm using WNS and the basic routine works fine (notification channel uri exchange, delivering toast notifications, etc.)

Now I want to increment badge value with server notifications and decrement it with local notifications. After digging the manuals I don't seem to find a way to do that without a background task that would receive raw notifications and do something to set the correct value. All I find available is [**setting** the value](https://msdn.microsoft.com/en-us/library/windows/apps/xaml/br212849.aspx). I would rather avoid using background tasks at all as they can be blocked by battery saver (by user intention or not). Skype, for instance, doesn't seem to be capable of providing any notifications at all with background execution blocked, and I don't want my app to behave that way.

So, there are two questions I'd like answered:

1. Is there a way to increment/decrement badge value through notifications alone?
2. Is there a way to get current badge value in application code?