Programmatic volume control - General Questions and Answers

I was wondering if anyone has any experience with controlling the ringer programmatically.
I've got a program where I want to turn off the ringer but if high priority calls come in allow the phone to ring. I've got the code working that changes the volume properly (using waveOutSetVolume) and have the code to identify the incomming call [SystemState.GetValue(SystemProperty.PhoneIncomingCallerNumber)]. The problem I'm having is that when I get the call and turn on the volume (can see the icon change from mute to enabled), the phone still doesn't ring. I assume it's because the phone app was in silent mode at the time.
I could play the sound myself (assuming I can find the current ring tone), but I don't want to have to manage them answering the phone and stopping it. So, is there a way to have the phone app actually ring correctly.
Thanks in advance

I'm not sure why this was moved from Development and Hacking to General Questions. I'll try to give a little more detail.
I'm writing a .NET Compact Framework application. This application is controlling the volume of the phone (HTC Touch Pro right now, but will expand to others). I am currently using the waveOutSetVolume function (via P/Invoke) to set the phone to silent (Volume = 0). However, if certain high priority calls are identified, I am setting the volume back to the original settings.
The problem is that even though I have restored the volume (and can verify that the volume has been set), the phone does not begin ringing since the call is already ringing. My assumption is that some system event has been missed or ignored. I would really like to reissue that system event so that all of the "work" is still performed by the phone application and not by my application. If the system is managing the ringing, I won't have to worry about whether they answered it or ignored it, just that I let it ring through.
Pseudocode (only relevant pieces):
Main:
CurrentVolume = waveOutGetVolume()
waveOutSetVolume(0)
SystemState.PhoneCallIncomming.Changed += IncommingCall_Handler
IncommingCall_Handler:
IncommingCall = SystemState.GetValue(SystemProperty.PhoneIncommingCallerNumber)
if(IncommingCall.Equals(@"1 (888) 555-1212")
{
waveOutSetVolume(CurrentVolume); //This line should make the phone ring but it doesn't.
}

Related

Slow Ringer Response

Anyone have Slow Ringer Response problems? It takes 2-3s before a call registers and the phone rings.
Vibrate before ring?
I was missing a lot of calls with like you say a 2-3 second delay before I heard any ringer, then i realized I had phone set to "vibrate BEFORE ring" rather than "vibrate AND ring"
Could it be that?
Good luck.
speakerphone said:
Anyone have Slow Ringer Response problems? It takes 2-3s before a call registers and the phone rings.
Click to expand...
Click to collapse
Well, maybe a second or two at max, but yes there is a delay.
What you can do, depending on your provider, is go into the phone settings, and call forwarding, and adjust the delay before it forwards unanswered calls to voicemail to 30 seconds.
I've made this change on my wife's phone as she always takes 29.9 seconds to find the phone in her handbag!
BadTasteUK beat me to it. This will not solve you delay issue, but should allow you sufficient time to answer the call.
same here. main prob that most people i know only allow 3-4 rings before hanging up.
same here.
i have a regular Phone anf it Allway rings a few seconds B4 the Polaris.
i remember having the same problem with previous htcs. maybe someone has found a way to resolve this. i ll search in the fora for previous models. hopefully we ll find somthing.
the same for mine with China mobile Chinese Version
I have dozens of 'missed calls' that don't ring, due to delay
I think it is connected in two ways:
1) Getting from standby mode is slow, takes a while to start again some services
2) Loading mp3s or wav files(ringtone) takes a small amount of time
Solution:
Find a way to cache sounds and/or have certain call services running all the time(which would drain battery faster)
This is an inherent windows mobile problem, and has been around for ages...
With little effort it could be done.
are all WM affected, or some brands worse than others?
I have found that I always get a delay of one ring before my HTC starts to ring. but it is worse if I use an mp3 rather than a mid or even wma. I also found that if I cut down the mp3's size to around 30 secs then it loads quicker
Try this solution :
Go to "HKCU\ControlPanel\Sounds\RingTone0\Script" in registry
normaly, you have this : apw3r
Replace by : apr
Explication :
A = Activation (??? i'm dont know)
W3 = Wait 3s
R = Ring
You can add "v3" if you want vibrate 3s !
No, it doesn´t work... only wait n seconds to repeat playing ringtone
24. Change ringtone/vibrate/LED flash characteristics
If you would like more control over how your device rings/vibrates/flashes its LEDs on events, you can can change the Script values of these events. For example, for an incoming call performing 'activate device, play ringtone, wait 3 seconds, repeat':
HKCU\ControlPanel\Sounds\RingTone0\Script = "apw3r" (REG_SZ string, no quotes)
For performing 'active device, set volume to 33%, play ringtone, set volume to 67%, play ringtone, set volume to 100%, play ringtone (no repeat)':
HKCU\ControlPanel\Sounds\RingTone0\Script = "ac33pc67pc100p" (REG_SZ string, no quotes)
The following are the full codes available to you. Please note that all the codes are executed simultaneously except after a ringtone play / wait code. E.g. 'v1p' will vibrate and play at the same time, while vibrating for 1 second. But 'pv1' will play the ringtone through all the way first, then start vibrating for 1 second.
a = activate device
cN = set volume to N in percentage max volume
fN = flash notification LED for N seconds
p = play ringtone. Note that this will play the ringtone all the way through before continuing with the next code.
r = repeat. Note that this should be the last code in your Script string, if used at all.
vN = vibrate for N seconds
wN = wait for N seconds. Note that the device will wait this long before continuing with the next code.
erf, sorry
3 second delay
There is a software program called "tweaks 2k2.net". Under the heading of Phone tweaks there is an option to disable the 3 second ringtone delay (it works fine for me). So I think the delay has been put there for a purpose. The only downside is that you have to purchase the software. Hope this helps.
3 second ringtone delay is set and unset in the control panel already
my machine uses sktools, and under "option to disable the 3 second ringtone delay" it was already disabled but still slow.

Why dosent my phone react to profile change? wm 6.1

Hi guys,
I need your help. Im using a Asus p750 running wm 6.1. It seems that the phone dosent care to what profile im using. If i have phone on "silent" without ring signal or vibra still the phone rings at a incoming call. Same on all profiles i use. Always a ring signal!!! Total newbie so hoping for a easy fix. Maybe you expers have any ideas?
I have tryed to use SPB phone suite, same problems with thoose profiles. Phone dosent seem to care what profile i shoose to use.
Cheers.
/Jonas
Are you sure you are turning down the ring volume and not just the system.
Thnx for you answer Joel.
I set profile by Settings - Profile - Silent/Meeting etc. If i shoose Silent (Volume:Off Vibrate:Off) and i go back to the homescreen i notice a speaker icon with a X next to it. So i guess i have shoosen correct to get a silent incoming call? Dosent happen though, phone screams like a pig when i get a incoming call. Im i doing something wrong?
tap the speaker icon in the bar and you should get a pop up with two sliders, one for system sound, one for ringer, turn the ringer all the way down and try it again.
Both ringer and System sound are set to lowest and OFF. Still a ringsignal when a incoming call. Was just in a meeting where i bragged about the meeting sceduler that sets phone to meeting profile by auto. Ye right i had 3 incoming calls disturbing that meeting. Argh.
Ahh im using Inesoft Phone Suite and that stupid software uses its profiler and it seems to override all other profilers. Great, now i know what the error is... to bad you cant disable just the profiler... good software othervise..
Ver 5 let's you turn off the Profiler.... but... it doesn't actually turn off... whatever Inesoft profile it was set to when you disable the profiler remains active...
Really annoying... and their support seems non-existent...

[PARTLY SOLVED][NEED HELP] Set ring/sms to vibrate WITHOUT altering sound volume

Hi,
I'm searching for a tool, preferably command line driven with options, to do something quite unusual : Set Ring/SMS notifies to "vibrate" but WITHOUT altering the global sound volume.
I recently evaluated PhoneWeaver which is quite neat and highly configurable and I was able to do that. I altered the profiles (night/day) in order to set all notifies to vibrate but at the same time, kept the global volume configuration untouched!
Unfortunately, PhoneWeaver is a bit overkill for what I really need and I don't need a so featured software.
Why would I want that ? Simple... late at night when I go back home, I love listening music with my neat headphones but if I receive a phone call, I want it to be quiet
Setting volume mode to "vibrate" puts the volume at mute level so I can't enjoy my music.
Anyone knows how to achieve that ?
Well,
I've investigated as far as I could and found a partial solution that works for now only for SMS.
Using the amazingly excellent MortScript, I could alter registry to make SMS notification behave like I want :
HKCU\ControlPanel\Notifications\{A877D65B-239C-47a7-9304-0D347F580408}
and set "Options" to DWORD "2" for "Play sound" and "1" for "Vibrate".
Well, it's fine for SMS but I can't get it to work for the Phone part. HKCU\ControlPanel\Notifications\Phone => Options
seems to have NO effect.
Altering HKCU\ControlPanel\Sounds\RingTone0 => Script
to switch between "apw1r" (Play sound) and "av1r" (Vibrate) does not produce a real time effect (only after soft reset).
Anyway, it works when using "Sounds and Notifications" applet directly so it seems that I lack a simple "refresh system" command to make it take these news settings effective.
Any clues on achieving that goal ?
Thanks.

[Q] Tasker: How to lower volume for Non-PhoneBook Contacts

Dear all,
I'm new to Android phones, but i am q sure i set up the Tasker profile correctly...
So what i wish to achieve is:
For certain hours of the day,
Set volume ringer to 1
BUT for callers listed in my phone book,
Turn volume ringer to 6
i have read and tried tasker.wikidot.com/sleepmode and it does work nice, but i don't want my phone to be on Silent Mode because i am afraid there might be a chance that there's a legit call from someone not in my phonebook...
So when i replace the "Silent Mode" ON/OFF to "Ringer Volume" 1/6 (1 as the default sleep mode, 6 as the caller exception obviously) it does not work at all;
When there is a phonebook-listed caller calling in (i set caller number to C:ANY), i can hear for a second or two that the modified profile does increase the ringtone to level 6, but it will drop back down again to level 1 after that 1-2 second of ringing loud...
I do not have any other profile that fiddles with ring volume, just gestures for activating camera and cell tower location to turn wifi off...
I even tried running just a simple test:
1) set phone's ringing volume 1 by pressing the decrease volume side button on the phone body
2) turn off ALL Tasker profiles
3) create and activate the following tasker profile:
Event: Phone Ringing: (phone number left as blank)
Task: Ring Volume: 6
4) call in using another phone
5) it still gives the same result (1-2 seconds of loud ringtone, then back to the soft ring volume, and when i check afterwards, the phone's ringtone volume is 1, not 6)
I'm running Samsung Galaxy S II with stock Gingerbread (rooted of course)... and this is my first android... so i have no experience with trying this profile on other phones, or other versions of Android...
Can anyone help?
Thank you so much,
denny

[Q] Identify phone ringing is put on silent in Android

I am creating an app which will speak the caller name when the phone rings. I am using TTS for this. Everything is working smooth except in one situation. When the phone rings at time user press the Volume / Turn off button to put the ringing on silent though incoming call continues. I am unable to handle this situation. I have one UI (Activity) for app settings, One BroadCast reciever to handle calls, One PhoneStateListener to check the incoming call and one Service to execute the TTS. How and where to handle this trigger when the user puts the ringing of the phone in silent.

Categories

Resources