webOS Nation Forums >  Homebrew >  webOS Patches > [Patch] Auto Speakerphone via Proximity Sensor
[Patch] Auto Speakerphone via Proximity Sensor
  Reply
 
Thread Tools Display Modes
Old 04/29/2010, 02:58 PM   #1 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
This patch switches between the front and back speaker as the display is turned on & off by the proximity sensor with alternate versions available to enable/disable the feature using the mute/ringer switch.

4 versions will now be available:
  • INSTANT - immediately changes the audio route when the display is turned on or off + alternate with mute/ringer option
  • DELAYED - a 2 second delay is observed before the audio route is changed from front to back only; the back to front will change immediately + alternate with mute/ringer option
No adjustable version will be available yet.


Please see post# 133 for the most current patch files for all versions and complete details.


As always, enjoy!


Patch creation is something I do in my spare time for myself and the Precentral community.
If you find value in my work, please take a moment to click the thanks button.
Should you be inclined, a donation link is available in my signature, and a sincere thanks to those who have.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor

Last edited by xanthinealkaloid; 05/16/2010 at 10:02 PM.
xanthinealkaloid is offline   Reply With Quote
Old 04/29/2010, 03:23 PM   #2 (permalink)
Member
 
maxima2k53's Avatar
 
Posts: 3,585
i used the instant one and it works perfect..

Update: only problem is if u dial a number and u dont yet put the phone to your ear the call is still at ear piece mode...u have to 1st put it at your ear and then put it out to speakerphone

Update 2: its weird sometimes it works perfectly when u dial a number without putting it to your ear and it goes automatically to speakerphone sometimes it doesnt do it automatically and u have to put it to your ear and then out again, so there you have it
__________________
Juan

2010-2011 Champions!


Last edited by maxima2k53; 04/29/2010 at 03:29 PM.
maxima2k53 is offline   Reply With Quote
Thanked By: xanthinealkaloid
Old 04/29/2010, 05:34 PM   #3 (permalink)
Member
 
Posts: 162
The instant works perfectly on the pixi, ill check back in a few days and report.
Lancerz is offline   Reply With Quote
Thanked By: xanthinealkaloid
Old 04/29/2010, 05:35 PM   #4 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
It appears it needs a default set...easy enough.

.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor
xanthinealkaloid is offline   Reply With Quote
Old 04/29/2010, 06:03 PM   #5 (permalink)
Member
 
Posts: 162
Quote:
Originally Posted by maxima2k53 View Post
i used the instant one and it works perfect..

Update: only problem is if u dial a number and u dont yet put the phone to your ear the call is still at ear piece mode...u have to 1st put it at your ear and then put it out to speakerphone

Update 2: its weird sometimes it works perfectly when u dial a number without putting it to your ear and it goes automatically to speakerphone sometimes it doesnt do it automatically and u have to put it to your ear and then out again, so there you have it
Do you have a pre? On the pixi you don't have to put it to the ear first for it to use the speakerphone, not sure if that makes a difference though.
Lancerz is offline   Reply With Quote
Old 04/29/2010, 06:06 PM   #6 (permalink)
Member
 
maxima2k53's Avatar
 
Posts: 3,585
Quote:
Originally Posted by Lancerz View Post
Do you have a pre? On the pixi you don't have to put it to the ear first for it to use the speakerphone, not sure if that makes a difference though.
like i said in my previous post...there was a time that i was making a call and i didnt put my pre in my ear and it was still in earpiece mode (not speaker phone) and the only way to get it to speaker phone was to put my pre to my ear then back out....

but i tested it out again and it worked perfectly....i made a call without putting my pre to my ear and it was on speaker mode and i put it to my ear and it was on ear piece mode....so its weird.... anyways the patch works great just that it works 50-50 for me at the beginning..but still works overall
__________________
Juan

2010-2011 Champions!

maxima2k53 is offline   Reply With Quote
Thanked By: xanthinealkaloid
Old 04/29/2010, 06:14 PM   #7 (permalink)
Member
 
mamouton's Avatar
 
Posts: 5,719
Quote:
Originally Posted by xanthinealkaloid View Post
It appears it needs a default set...easy enough.

.
I tried your first one today and it appeared to work fine but didn't give it real testing. When do you plan on updating with the default so I can grab and go. Thanks!
__________________
My contributions to customizing the Palm Pre.

Browser Mega Mix|Email Mega Mix|Additional Sync Days|
Disable Various Phone Sounds|Priority Discard Buttons|
mamouton is offline   Reply With Quote
Old 04/29/2010, 06:26 PM   #8 (permalink)
Member
 
maxima2k53's Avatar
 
Posts: 3,585
Quote:
Originally Posted by xanthinealkaloid View Post
It appears it needs a default set...easy enough.

.
Quote:
Originally Posted by mamouton View Post
I tried your first one today and it appeared to work fine but didn't give it real testing. When do you plan on updating with the default so I can grab and go. Thanks!
yeah let us know when u update it to have a default set...
__________________
Juan

2010-2011 Champions!

maxima2k53 is offline   Reply With Quote
Old 04/29/2010, 06:53 PM   #9 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
Quote:
Originally Posted by maxima2k53 View Post
like i said in my previous post...there was a time that i was making a call and i didnt put my pre in my ear and it was still in earpiece mode (not speaker phone) and the only way to get it to speaker phone was to put my pre to my ear then back out....

but i tested it out again and it worked perfectly....i made a call without putting my pre to my ear and it was on speaker mode and i put it to my ear and it was on ear piece mode....so its weird.... anyways the patch works great just that it works 50-50 for me at the beginning..but still works overall
No worries here...I had the same result...I was just to tired to notice it, so I'm glad you mentioned it.

I'm going to set the default to speaker...I'll be posting the updates shortly.

One question other is going to be if a 3 second delay is enough for those folks who want the delay...I've tried it, and it seems to be a good amount of time without being too long.

.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor
xanthinealkaloid is offline   Reply With Quote
Old 04/29/2010, 08:48 PM   #10 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
Update patch file in OP for the INSTANT version, so that one should be good to go for the basics.


I noticed the DELAYED version is getting 1 sec bit of sound through the back speaker when doing quick on/off of the display...I'll post an update once it's working.

.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor

Last edited by xanthinealkaloid; 04/29/2010 at 09:54 PM.
xanthinealkaloid is offline   Reply With Quote
Thanked by maxima2k53, stu5797
Old 04/29/2010, 09:00 PM   #11 (permalink)
Member
 
Posts: 1,674
youre the man!
__________________
*Patchers STILL make this phone Perfect!
Palm Devices Currently Owned: Pre, Pre Plus, Pre 2, Pre 3, Pixi, Veer, Touchpads, and too many touchstones!
stu5797 is offline   Reply With Quote
Old 04/29/2010, 11:16 PM   #12 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
Update patch file in OP for the DELAYED version, so that one should be good to go for the basics.

I ended up having to go with a setTimeout, but it works...If anyone has any suggestions for minor tweaks prior to Preware submission, please share.


Anyhow, now both patches are good to go as they are!

.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor
xanthinealkaloid is offline   Reply With Quote
Old 04/30/2010, 12:21 AM   #13 (permalink)
Member
 
maxima2k53's Avatar
 
Posts: 3,585
Quote:
Originally Posted by xanthinealkaloid View Post
Update patch file in OP for the INSTANT version, so that one should be good to go for the basics.


I noticed the DELAYED version is getting 1 sec bit of sound through the back speaker when doing quick on/off of the display...I'll post an update once it's working.

.
i had a slight problem making it work at the beginning from where it didnt work at all so i uninstalled it and installed it again and now it works...but ill keep ok testing it
__________________
Juan

2010-2011 Champions!

maxima2k53 is offline   Reply With Quote
Old 04/30/2010, 11:41 AM   #14 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
I had to repost the DELAYED version…When I fixed it, I inadvertently left out the line blocking the screen timeout.

My apologies.

.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor
xanthinealkaloid is offline   Reply With Quote
Old 04/30/2010, 02:28 PM   #15 (permalink)
Member
 
Posts: 15
SIMPLY AWESOME !!!!
best patch I have seen yet. WELL DONE !!
dalewinterstein is offline   Reply With Quote
Old 04/30/2010, 02:56 PM   #16 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
OK...I had to post yet another update for both versions to fix an issue with the screen timeout while the Phone app is carded causing the audio to go to the front speaker.

Please see the OP for the new patch files.

My apologies...This patch has sort of been a process.

.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor
xanthinealkaloid is offline   Reply With Quote
Old 04/30/2010, 04:32 PM   #17 (permalink)
Moderator
 
Cantaffordit's Avatar
 
Posts: 15,215
Will the headset and/or bluetooth override this?

I wouldn't want it switching to speaker phone if I'm using a headset... I realize I might not have it up to my face, but you never know...
Cantaffordit is offline   Reply With Quote
Old 04/30/2010, 04:36 PM   #18 (permalink)
Member
 
xanthinealkaloid's Avatar
 
Posts: 942
Quote:
Originally Posted by Cantaffordit View Post
Will the headset and/or bluetooth override this?

I wouldn't want it switching to speaker phone if I'm using a headset... I realize I might not have it up to my face, but you never know...

This patch shouldn't affect BT and/or a headset, but I really have no way of testing it…I don't have BT and/or a headset.

However, the condition frause added certainly should prevent the switching from firing and the prox sensor shouldn't be active when on BT and/or a headset.

Please report if you have any issues though.

.
__________________
a.k.a. Josh...

Please don't forget your thanks button. --- Appreciate my efforts? -- Donate?

Various patches I've worked on:
Faster Cards|Emoticons|Shake Reload|Default Call Log|Call Log Styling|Msg Count|New Events|DM Media Vol|Megamix+MediaVol|3G icon|Gmaps fullscreen|Msg Greeting/Sig|Send Img Msg|No Ans Tstone|Dpad on Call|Vid Delete Btns|AutoSpeaker via ProxSensor
xanthinealkaloid is offline   Reply With Quote
Old 04/30/2010, 05:19 PM   #19 (permalink)
Member
 
frause's Avatar
 
Posts: 303
Quote:
Originally Posted by Cantaffordit View Post
Will the headset and/or bluetooth override this?

I wouldn't want it switching to speaker phone if I'm using a headset... I realize I might not have it up to my face, but you never know...
Quote:
Originally Posted by xanthinealkaloid View Post
This patch shouldn't affect BT and/or a headset, but I really have no way of testing it…I don't have BT and/or a headset.

However, the condition frause added certainly should prevent the switching from firing and the prox sensor shouldn't be active when on BT and/or a headset.

Please report if you have any issues though.

.
It works as expected with a BT headset. No auto-switching when on headset, you can turn the screen off and manual switching between headset and speakers works as usual.

This patch is pretty awesome!
__________________

Visor -> m515 -> Treo 650 -> HTC TyTnII -> Treo 750 -> Treo Pro -> Prē -> Prē Plus -> Prē 2

WebOS Patches: Ringer switch icon in Top bar, Disable LightBar, Week Numbers in Calendar (ISO 8601)
frause is offline   Reply With Quote
Thanked By: xanthinealkaloid
Old 04/30/2010, 05:29 PM   #20 (permalink)
Member
 
frause's Avatar
 
Posts: 303
Just a thought: Would it be a good idea to block switching when the ringer switch is set to mute?
__________________

Visor -> m515 -> Treo 650 -> HTC TyTnII -> Treo 750 -> Treo Pro -> Prē -> Prē Plus -> Prē 2

WebOS Patches: Ringer switch icon in Top bar, Disable LightBar, Week Numbers in Calendar (ISO 8601)
frause is offline   Reply With Quote
Thanked By: xanthinealkaloid
Reply

 

Tags
patch

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0