Windows Phone 7 Volume Settings programmatically - windows-phone-7

Is there a way to programmatically change the sound settings of Windows Phone 7? Enable or disable sounds for Appointment and all other notifications? Also to change the global volume i.e.:Ring tone.

There is no API to enable the tasks that you've mentioned. You can adjust the sound volume for the sounds within an application by using the XNA API's, but that is the extent of the control that is currently available.

You can control the volume of the media player and of a sound affect, but you don't have control over the master volume. Also note there is a bug in the sound drivers on some HTC devices that causes them to ignore the volume setting on sound affects.

Related

Record audio in background

I'm wondering if anyone has any idea that capture audio from the device's microphone on the new Windows Phone 7 in background (Silverlight, not XNA)
or any code to do it?
Even in a Silverlight application, the Microphone is accessed via libraries in the Microsoft.Xna.* namespaces.
The use of such namespaces is not supported in a Background Task. See http://msdn.microsoft.com/en-us/library/hh202962(v=vs.92)
This is not possible and would break the security principle of not allowing apps to do something that the user isn't aware of.

Show UVC windows phone 7

Good day all.
Can i show/hide UVC (Universal Volume Control) from my code?
Maybe any API, for example Device.ShowUVC() ?
Up to Windows Phone Mango SDK, you cannot ask the OS to show the volume control UI through code.
You can have some action on this UI through Microsoft.Phone.BackgroundAudio namespace, when your app play sound in background (ie. set if the UI show play/pause/shuffle buttons via EnabledPlayerControls enumeration).

How to select or play a system sound in windows phone 7(.1)?

I want the user of my app to be able to select a sound from the windows phone 7 system sounds, or play a specific one (like playing the "new email"-sound).
How can I enumerate the installed sounds? Or is there a builtin sound-selector? Can I ask the system which sounds are played for what events?
Access to system sounds is not available. This include playing the sounds or seeing what files/sounds are associated with what events.
The exception is saving new files to use as ringtones which can now (as of 7.1) be done with the SaveRingtoneTask.

How to programmatically turn GPS on and off in Windows Phone 7

So far, to turn on and off the GPS device in Wp7, I do it in Settings Menu. Wonder If this can be done in code?
Thanks
---------- Update
Sorry for the confusion. Instead of turning GPS on and off, What I really mean is how to turn on and off the LOCATION in the Settings Menu of Wp7.
You can get the GPS data but you are not able to turn the sensor on or off via your application.
The most you can do in your application is start the geolocation data acquisition and stop it.
Windows Phone 7 apps should not change global settings for the phone.
You should have your own settings page in your app, with it's own toggle for whether or not your app should use the location data.
Then you check your setting before you access the location data.
Why would you want to turn it off globally?

How do I change my Active Sound Card on the Fly?

I currently have speakers set up both in my office and in my living room, connected to my PC via two sound cards, and would like to switch the set of speakers I'm outputting to on the fly.
Anyone know an application or a windows API call that I can use to change the default sound output device? It is currently a bit of a pain to traverse the existing control panel system.
That topic is covered in depth here Easily Change or Switch the Default Audio Sound Output in Vista or XP. Note that sound management was changed in Vista significantly.
On a side note, I believe SnapStream is/was working on an application to allo multi-channel sound cards to output to different rooms (sets of speakers) simultaneously.

Resources