Up until now I thought that changing the system volume from your app is impossible, until recently a new app called Quite Hours (http://www.windowsphone.com/en-us/store/app/quiet-hours/f347a36b-80c0-430f-8631-e55046ee5a2a) actually did just that in a very neat way.
Does anyone please know how to do that programmatically? I tried using the MediaElement or the xna MediaPlayer and the backgroundAudioPlayer and nothing worked. Any help would be appreciated! Thank you!
There currently is no API available for controlling the system volume. You can however control the volume in the elements of your application (via the classes MediaElement, BackgroundAudioAgent). You can also control the volume on sound effects of your application using XNA API. See http://msdn.microsoft.com/en-us/library/bb195052%28v=xnagamestudio.30%29.aspx
The developers of the apps mentioned in the OP were able to change system volume under WP8.0. Apparently whatever method they used has now been disabled under WP8.1. The following apps now display disclaimers that they no longer work on Windows Phone 8.1: Quiet Hours and Volume Manager
They direct to the following page to vote to allow this functionality: Windows Phone Dev User Voice
Additionally please read the following thread on the MSDN forum: MSDN change system volume Windows Phone 8. This functionality was likely achieved using WASAPI (which I have personally tried, and failed, it does not work, comment if you want my code to try it.), or the developers of the volume apps might have had access to AudioClientRestricted.h. If one had that h file, one would have access to system volume under WP8.1, so I somehow doubt the developers used the h file designated for OEMs because it would work un 8.1.
Talking with James Dailey (who works @ MSFT) indicates it is technically possible using WASAPI ISimpleAudioVolume If you read @ the bottom of that page there is a comment indicating you must use IAudioEndpointVolume
Added note from James Dailey @ MSFT: