Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,448 Members 40,704 Now Online
XDA Developers Android and Mobile Development Forum

[APP] Proximity Sensor for Screen Off v0.2

Tip us?
 
exidler
Old
(Last edited by exidler; 29th January 2010 at 07:51 PM.) Reason: new version
#1  
Senior Member - OP
Thanks Meter 83
Posts: 149
Join Date: Oct 2007

 
DONATE TO ME
Default [APP] Proximity Sensor for Screen Off v0.2

May be this tool will be usefull.
It switch off screen using proximity sensor detection.
Like alternative power button.
After proximity detected - screen switched off and proximity sensor don't used until screen will be switched on again manualy.

No screenshots
Second time running will unload program from memory, it can be used for switching on/off proximity lock feature.

All settings in registry, settings reloaded on each program run.

HKEY_CURRENT_USER\Software\Exidler\Hd2ProximityScr eenOff
AfterCallReactivateSensor = dword:150 - time in ms when activate proximity sensor after call ended
SensorOffWhenProximity = dword:0 - time in ms when disabling proximity sensor on proximity detected. May be useful for disabling accident detection. This time proximity sensor is still active and if no porximity detected with this time - screen will be switched on automatically
ActiveOnlyIfLocked = dword:0 - Activate Proximity sensor only if Phone locked.

HKEY_CURRENT_USER\Software\Exidler\Hd2ProximityScr eenOff\Exceptions
Create any named sub keys with values:
ClassName = string - name of windows class
WndTitle = string - title of window
ProcName = string - name of process

For exception windows proximity sensor will be disabled if this one window is active.
All criterias are optional. For example create only one value ProcName="Explorer.exe" for disabling proximity lock when Resco Explorer is active.

Proximity sensor activated only in portrait mode.

Change log
2010-01-29: v0.2
- full uninstallable cab
- add options: After Call Reactivate Sensor, Sensor Off When Proximity, Active Only If Phone Locked, Exception windows
- disbaling Proximity lock when landscape mode

2010-01-28: v0.1 Test version. Bugs possible.
Attached Files
File Type: cab Hd2ProxmityScreenOff-0.1.CAB - [Click for QR Code] (9.4 KB, 1693 views)
File Type: cab Hd2ProximityScreenOff-0.2.CAB - [Click for QR Code] (79.5 KB, 11122 views)
 
richardirv
Old
#2  
richardirv's Avatar
Senior Member
Thanks Meter 7
Posts: 383
Join Date: Mar 2008
Great something to get us started, did you make this yourself? Are you willing to put some time in to perfect it & create some options etc. if we bug test it?
 
ET
Old
#3  
ET's Avatar
Senior Member
Thanks Meter 1
Posts: 389
Join Date: Aug 2006
Quote:
Originally Posted by exidler View Post
May be this tool will be usefull.
It switch off screen using proximity sensor detection.
Like alternative power button.
After proximity detected - screen switched off and proximity sensor don't used until screen will be switched on again manualy.

No screenshots, not settings, just install and reboot phone (or run tool manual from Install directory)

Second time running will unload program from memory.

Test version. Bugs possible.
How will this effect the screen turning on after a phonecall, i wan't the screen automatically turned on after a call without having to press a button.
Will this tweak allow default function in that case?
Life is one BIG party, it's a shame I'm not invited.
 
exidler
Old
#4  
Senior Member - OP
Thanks Meter 83
Posts: 149
Join Date: Oct 2007

 
DONATE TO ME
Quote:
Originally Posted by richardirv View Post
Are you willing to put some time in to perfect it & create some options etc. if we bug test it?
I don't know which options may be added.
I'm can't full control proximity sensor. It's only possible to enable proximity sensor, and htc drivers switching off screen by itself. The i'm disable proximity sensor again

But if it's will be possible to implement some features - i can try to do this.
Weather Screen - weather animations on ANY custom background
Panoramic Screen - 3D panorama from ANY background image
Slideshow HD - fast and easy-to-use fullscreen slideshow
 
richardirv
Old
#5  
richardirv's Avatar
Senior Member
Thanks Meter 7
Posts: 383
Join Date: Mar 2008
Ok this is a good start, for me the following things need to be worked out for this to work good.

1. Only works when phone is upright, ie. Portrait. Reason being is if the screen goes off via Proximity in when holding the phone in landscape there will be allot of accidental activations, especially while playing games etc. It is much less likely that proximity will be detected when holding the phone upright.

2. Screen needs to come back on when proximity not detected, as to not cancel out the in call screen off feature.

Will keep thinking! Really hope you can work some magic here exidler!! Thanks
 
exidler
Old
#6  
Senior Member - OP
Thanks Meter 83
Posts: 149
Join Date: Oct 2007

 
DONATE TO ME
Quote:
Originally Posted by ET View Post
How will this effect the screen turning on after a phonecall, i wan't the screen automatically turned on after a call without having to press a button.
it will handle proximity sensor to default behavior after call. so i think (and shure) - screen will blink for short time (~200ms) and will be switched off by tool.
Weather Screen - weather animations on ANY custom background
Panoramic Screen - 3D panorama from ANY background image
Slideshow HD - fast and easy-to-use fullscreen slideshow
 
ET
Old
#7  
ET's Avatar
Senior Member
Thanks Meter 1
Posts: 389
Join Date: Aug 2006
Quote:
Originally Posted by exidler View Post
it will handle proximity sensor to default behavior after call. so i think (and shure) - screen will blink for short time (~200ms) and will be switched off by tool.
Let me test, I assume the cab can be de-installed and everything is back to default behaviour?
Life is one BIG party, it's a shame I'm not invited.
 
exidler
Old
#8  
Senior Member - OP
Thanks Meter 83
Posts: 149
Join Date: Oct 2007

 
DONATE TO ME
Quote:
Originally Posted by richardirv View Post
1. Only works when phone is upright, ie. Portrait. Reason being is if the screen goes off via Proximity in when holding the phone in landscape there will be allot of accidental activations, especially while playing games etc. It is much less likely that proximity will be detected when holding the phone upright.

2. Screen needs to come back on when proximity not detected, as to not cancel out the in call screen off feature.
in call screen back on when no proximity
when not in call - it switch off. or you talking about switching on screen when not in call?

about landscape and portrait. it's make easy if screen orientation really changed (if not - polling g-sensor - is not a good idea for battery i'm think)
Weather Screen - weather animations on ANY custom background
Panoramic Screen - 3D panorama from ANY background image
Slideshow HD - fast and easy-to-use fullscreen slideshow
 
exidler
Old
#9  
Senior Member - OP
Thanks Meter 83
Posts: 149
Join Date: Oct 2007

 
DONATE TO ME
Quote:
Originally Posted by ET View Post
Let me test, I assume the cab can be de-installed and everything is back to default behaviour?
Cab is Uninstallable, but you must close program manually before uninstalling: run program second time, it will show message about closing
Weather Screen - weather animations on ANY custom background
Panoramic Screen - 3D panorama from ANY background image
Slideshow HD - fast and easy-to-use fullscreen slideshow
 
richardirv
Old
#10  
richardirv's Avatar
Senior Member
Thanks Meter 7
Posts: 383
Join Date: Mar 2008
Quote:
Originally Posted by exidler View Post
in call screen back on when no proximity
when not in call - it switch off. or you talking about switching on screen when not in call?

about landscape and portrait. it's make easy if screen orientation really changed (if not - polling g-sensor - is not a good idea for battery i'm think)
I just ment you don't want it to interfere with the in call actions the HD2 already has.

As you say g-sensor polling etc. no good for battery. I have a feeling this maybe flawed before we get started.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Paid Android App Developers Will Soon Have to Provide Physical Address

Google has now changed its policies regarding paid app developers. … more

Windows Developers Rejoice! Dev Program’s $99 Yearly Fee is No More!

Microsoft rule in the mobile market, much like the giant dinosaurs … more

Add the Xperia Z2 Lock Screen to Your Favorite KitKat ROM

Almost every OEM adds its own unique flair to their stock firmwares. While some of … more

Android App Review: Control Your Phone with Quick Control Panel – XDA Developer TV

Your Android smart device has many features that you … more