?
Solved

Program to change the phone volume when plug-in/un-plug headphones

Posted on 2007-09-28
11
Medium Priority
?
369 Views
Last Modified: 2013-12-27
Can someone write a program for me.
What I want is a small program for my HP iPaq h6365 Pocket PC 2003 Mobile.

Program to do:
(bear in mind that I also use a bluetooth headset - if that has any effect on the senario)
- When I plug in my headphones to listen to music, I want the program to automatically turn the phone volume down to 1
- When I unplug my headphones, I want the program to automatically turn the phone volume up to either the volume I had before I used the headphones (preferrable) or to the max phone volume (as this is what I use most anyway if the previous is too hard).

In addition to posting the code up here, I am just learning to program so for me to be able to test it are you able to compile it for me & post up a download somewhere? that'd speed the process up a lot.

Thanks.
0
Comment
Question by:gamm
  • 6
  • 4
11 Comments
 
LVL 41

Accepted Solution

by:
graye earned 1000 total points
ID: 19977851
I'm not an expert on that smart phone, but I don't think there is a software "switch" that occurs when the headphones are plugged in/unplugged.  I think it's just a mechanical/electrical connection and not tied to the operating system events.
0
 
LVL 48

Assisted Solution

by:Mikal613
Mikal613 earned 1000 total points
ID: 19990147
There is no notification when Headphones are plugged in.

But this article should deff catch your interest.
http://msdn.microsoft.com/msdnmag/issues/07/10/NoiseDetection/default.aspx
0
 
LVL 4

Author Comment

by:gamm
ID: 20003786
Wow, that looks awesome.
Do they have a compiled version for 2003 mob somewhere? I'm afraid I have no resources or programing know how to compile this myself.. I would def use that program though.

I've actually come up with another idea that I was about to use that is related to this article.. I was going to create a ring tone that would start at normal volume for the first ring and then go to a full volume ring afterwards for say 5 rings. This would get e around the embarrasment/not hearing issue when inside/outside.

Unfortunately don't think it will help with the headphones though :(
If I forget to turn the phone volume down when I plug in my headphones & it rings I will still go deaf..
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 4

Author Comment

by:gamm
ID: 20003787
Perhaps someone could write a slightly different program, one that channels the ring tone to always go to the built in speaker - that would resolve my issue I think.
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 20005697
full volume ring afterwards for say 5 rings

you have that option under the phone options its called "Increasing ring"

" always go to the built in speaker "

It always does
0
 
LVL 4

Author Comment

by:gamm
ID: 20006429
That is true, there is the option to increase ring, but by the time it gets to 5 (full volume) (which I need while outside) I've missed the call. This option also doesn't allow vibrate at the same time, which I need, esp while outdoors in shopping centres etc.

To clarify what I was describing above, it would ring once at a low volume and then 5 times at a high volume, the idea being that if it was quiet enough for me to hear the 1st ring I could answer it, but if it was too loud then I would hear it on the 2nd ring & not miss the call.

Actually, when I have headphones plugged in the ringtone sounds in the headphones, not through the phones built in speaker (which is why I get my ears blasted if I don't turn the phone volume down while listening to music).
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 20006453
"when I have headphones plugged in the ringtone sounds in the headphones, not through the phones built in speaker (which is why I get my ears blasted if I don't turn the phone volume down while listening to music).

Oh ok i misunderstood that specific point.

You can make a custom ringtone by appending a lowvolume and highvolume ringtone.
0
 
LVL 4

Author Comment

by:gamm
ID: 20011030
yeah, that's what I was planning on doing, wanted to see if I could get a program to meet my needs instead...
If I could find a way to always have the phone ring through the built in PDA speaker that'd do the job...
0
 
LVL 4

Author Comment

by:gamm
ID: 20082356
Still looking for a solution to this one (other than the one I've provided).
Anyone have further ideas that can resolve this issue?

Thanks
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 20082499
You cant do what you want to do
0
 
LVL 4

Author Comment

by:gamm
ID: 20082632
The only solution to the problem so far is what I posted in ID: 20003786, 2nd parragraph.

The link you posted in ID: 19990147 was very interesting, but it doesn't resolve the original problem, as my ears will still get blasted when I'm listening to music in a quiet environment (even if I can figure out how to compile the linked program).

I proposed a possible solution in ID:20011030; while it wouldn't do what I originally wanted (see initial responce from graye), it is the best work around I can come up with.

Regards.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Screencast - Getting to Know the Pipeline
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question