For Programmers: Free Programming Magazines  


Home > Archive > Smartphone Developer Forum > March 2006 > Changing to and from Silent Profile









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Changing to and from Silent Profile
samrule@gmail.com

2006-03-29, 7:06 pm

Has anyone figured out how to do this?

My application notifies the user that they are in Silent mode and asks
them if they would like to turn off Silent mode. If they answer 'yes',
the registry setting for the profile is changed from 'Silent' to
'Normal'. However, this does not fully take the phone out of silent
mode. When the phone is returned to the home screen, it still shows
the vibrate icon and I cannot hear the key press clicks.

I have messed around with the SendMessageTimeout and SendMessage
functions with a HWND_BROADCAST and a WM_SETTINGCHANGE, but still no
luck. Somehow I need to tell the OS that the 'Silent' mode has been
changed to 'Normal'

The application requires sound and so simply running the application
without sound is not an option.

Yaroslav Goncharov

2006-03-30, 4:04 am

You can try to use Registry CSP
http://msdn.microsoft.com/library/d...strycspozup.asp

to change the active profile since ActiveProfiler is documented there.
However, it is possible the system won't get notified automatically even if
you use this CSP.

As a workaround you can reboot the device or simulate button clicks to
change the profiler using the standard profile UI.

--
Yaroslav Goncharov
Spb Software House, http://spbsoftwarehouse.com
Pocket PC Developer Network, http://pocketpcdn.com


<samrule@gmail.com> wrote in message
news:1143673901.036925.315410@e56g2000cwe.googlegroups.com...
> Has anyone figured out how to do this?
>
> My application notifies the user that they are in Silent mode and asks
> them if they would like to turn off Silent mode. If they answer 'yes',
> the registry setting for the profile is changed from 'Silent' to
> 'Normal'. However, this does not fully take the phone out of silent
> mode. When the phone is returned to the home screen, it still shows
> the vibrate icon and I cannot hear the key press clicks.
>
> I have messed around with the SendMessageTimeout and SendMessage
> functions with a HWND_BROADCAST and a WM_SETTINGCHANGE, but still no
> luck. Somehow I need to tell the OS that the 'Silent' mode has been
> changed to 'Normal'
>
> The application requires sound and so simply running the application
> without sound is not an option.
>



riki

2006-03-30, 10:02 pm

Yaroslav Goncharov wrote:
> You can try to use Registry CSP
> http://msdn.microsoft.com/library/d...strycspozup.asp
>
> to change the active profile since ActiveProfiler is documented there.
> However, it is possible the system won't get notified automatically even if
> you use this CSP.


ly this doens't work:

http://groups.google.com/group/micr...34217af7380e222

riki

----
I poured beer on my lawn and it came up half cut!
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
Latest Betas have WM5 layout and speed dial support
Scott Lacy Salley

2006-03-31, 4:07 am

In article <ecxE3cHVGHA.776@TK2MSFTNGP09.phx.gbl>, riki wrote:
> Yaroslav Goncharov wrote:
>
> ly this doens't work:
>
> http://groups.google.com/group/micr...34217af7380e222


Sam and I are working fairly closely with the manufacturer. A third party wrote
a dll that looks like it is accessing a COM API to do the change/notification
for us. I think the interface was "ITPCProfiles” referenced from
“iprofiles.h”, but I don't know anything further, like if it is a standard
part of the smartphone internals.

--
Scott Lacy Salley <scottlacysalley@comcast.net>
formerly Scott Lacy Smith
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com