Possible app idea, proximty sensor. - XPERIA X1 Themes and Apps

I've been wondering, would it be possible to make an app that kicks in when you're on a call, that uses the light sensor as a proximity sensor.
The basic idea is, you put the phone to your ear, it blocks light and the screen locks, take it away from your ear, it detects more light, and unlocks the screen so you can enter numbers etc.
I was also thinking instead of being set at specific light levels (less than 50 for off, over 50 for on etc) it could work on a factor of relative brightness, so if it gets 5 times brighter it knows to unlock the screen.
Does this sound possible?

I don't think this can work. What happens during the night?

very old idea
phone must have bio sensor near speaker which touch to ear, so only hardware solving
using light sensor will work only with light, at dark place\time it doesnt work
another way is to make sensitive top of sensor display for touching but other part of display must be blocked
deadend

Tha X1 speaker is right next to the earpice, it's almost part of it, that's why gave me the idea.+As for dark places, that's why I suggested it measures a differennce in brightness, rather than specific values. Obviously at a certain point, it won't detect any change, I guess then the programdetect darkness up until the point of answering the call, and disable itself.
Or maybe there's a way to use the backlight to create a lightsource but have the touch part off...
Brightness would increase as the phone approached the ear, then drop off as it got there, then similar when you take it away.

Actually, based on the intention, I think it would be sufficient if the phone app is active, the screen is on and locked if phone app is inactive. Touching cheeks, etc are all not real problems in my opinion.

xperia tweak
xperiatweak will fix this issue.

Related

No in-call curtain in TP2

Hi,
I'm using an original ROM for TP2 with Manilla 2.1.38158.2 (as shown in Settings | About).
AFAIK this version should include the "in-call curtain" functionality, on which the call buttons are locked during a call. However, I see no sign for this anywhere.
Does anyone have an idea how this feature can be turned on, or how do I add it?
The curtain is unnecessary. Your device as a proximity sensor that turns off your display when you hold you face it. You don't need the curtain to lock the buttons. When you move the device away from your face, you probably want to use the touch screen so it turns back on.
I usually talk using a Bluetooth headset while the device is kept in my bag or pocket. The proximity sensor should theoretically detect that the device is covered and keep the screen off, but it often fails to do so, allowing random buttons to get pressed.
S2U2 doesn't solve this either, as it keeps the device unlocked during phone calls. There's TouchLockPro, but I don't like the way it works.
Have you tried CSDEVCTRL? I recall it allows you to lock the device during and after a call.
Yes, I found it in one of the forums here a couple of weeks ago. For some reason it didn't keep the device locked during calls, though specifically configured to do so. I haven't looked deeper into that, since I thought that the supposedly built-in curtain would do.
BTW, a simple test shows that the proximity sensor is completely useless for this scenario. I put a small object on the sensor, locked the phone and turned it off. I then called it from another phone and answered using the Bluetooth headset. Although the screen was blocked with an object, it was completely unlocked and could be pressed. The proximity sensor turned the screen off only if a movement was detected towards the screen, and not when something was already blocking the screen.
I repeated this test several times with the phone in a bag. I locked it, called, answered using the Bluetooth headset and tried to press against it from outside the bag. In every single time on-screen buttons got pressed.
As a matter of fact, the TP2 is way worse than the original TP in this sense. In my previous TP I could answer a call using the headset, take out the phone (carefully so it won't hang up by a screen press), lock it again and put it back in the bag/pocket. Now with the TP2 the proximity sensor wakes up the device unexpectedly, so I can never keep it inside anything during a call.
There is a shareware Pocket Shield which provides a screen curtain. You may have a try for your TP2 at this link:
http://pocketshield.netserver01.com/download.htm
erezshermer said:
Hi,
I'm using an original ROM for TP2 with Manilla 2.1.38158.2 (as shown in Settings | About).
AFAIK this version should include the "in-call curtain" functionality, on which the call buttons are locked during a call. However, I see no sign for this anywhere.
Does anyone have an idea how this feature can be turned on, or how do I add it?
Click to expand...
Click to collapse
I tried installing the InCallCurtain from my Touch Pro ROM and it does not work with the TP2. It is a different dialer so the calls for the curtain may not be in there.
My phone has no problem turning itself off when it gets near my face. Why would you want a call curtain?
Kloc said:
My phone has no problem turning itself off when it gets near my face. Why would you want a call curtain?
Click to expand...
Click to collapse
Did you read the thread ?!
Thanks Angler, I just tested Pocket Shield. I must say I like the progress of this program since the last time I tried it.
I won't use it as a general lock utility because of a severe issue: for some reason my Bluetooth headset loses the ability to answer calls while it's locked. I click the headset button, the ring sound moves to the headset, and the call is not picked up.
I'm thinking about only using its curtain feature - use only the protection during phone calls without locking. This seems to work, however PocketShield locks my device whenever it powers on and I can't find a way to cancel that without completely turning it off. Any ideas here?
(edit: removed double post)
erezshermer said:
BTW, a simple test shows that the proximity sensor is completely useless for this scenario.
Click to expand...
Click to collapse
Prox sensors come in different types. They aren't all configured to turn off "when covered" by just anything. Since the primary purpose is to save screen power when held against your face, it may well be technically designed to detect things that can conduct electricity, like you. If you're curious about it, as I am, next time you test it, cover the prox sensor with your thumb.
If that doesn't work, I recommend on second test. Just because there is a prox sensor doesn't mean that HTC is using only that for turning off the screen. In order to avoid accidentally turning it off while you're trying to use it, which would be annoying, they might be using the accelerometer to detect whether it's being held like a phone or not, and not turning it off if it isn't. Test two is to hold it in a position at an angle as if you would if you were talking on it, and hold your thumb over the prox sensor.
I don't have my TP2 yet, that's why I haven't tried it myself. If you're already on to your current solution and don't want to I understand, but if you do, I'd be curious as to your results.
fortunz said:
Prox sensors come in different types. They aren't all configured to turn off "when covered" by just anything. Since the primary purpose is to save screen power when held against your face, it may well be technically designed to detect things that can conduct electricity, like you. If you're curious about it, as I am, next time you test it, cover the prox sensor with your thumb.
If that doesn't work, I recommend on second test. Just because there is a prox sensor doesn't mean that HTC is using only that for turning off the screen. In order to avoid accidentally turning it off while you're trying to use it, which would be annoying, they might be using the accelerometer to detect whether it's being held like a phone or not, and not turning it off if it isn't. Test two is to hold it in a position at an angle as if you would if you were talking on it, and hold your thumb over the prox sensor.
Click to expand...
Click to collapse
Tested that with some objects and with my hand. Same results. Even with the phone being held vertically like I'm talking with it, the screen won't turn off if it was covered before the call. When removing the hand/object from the proximity sensor and covering it again - the screen turns off immediately.
Maybe this is not a limitation of the sensor but a simple programmed behavior. If so, perhaps it can be patched... <evil grin>
Update. Under HKEY_LOCAL_MACHINE\Software\HTC\Proximity there are 3 keys: ProximityDetectStatus, ProximitySensorOn, UnexpectedWakeup.
The first key is updated live by whatever the sensor detects. I now know for sure that the sensor continously knows if there's something on top - the dialer behavior is programmed.
I'm not sure what the other keys do. ProximitySensorOn was set to 0 on my registry and now when it's 1 I see no difference. Gotta go, will continue with that later.
Switching the Proximity Sensor off...?!
erezshermer said:
Update. Under HKEY_LOCAL_MACHINE\Software\HTC\Proximity there are 3 keys: ProximityDetectStatus, ProximitySensorOn, UnexpectedWakeup.
The first key is updated live by whatever the sensor detects.... I'm not sure what the other keys do. ProximitySensorOn was set to 0 on my registry and now when it's 1 I see no difference.
Click to expand...
Click to collapse
Although I was looking for other reasons -- see below -- I get the same result; & even when you do change ProximitySensorOn to 1, it doesn't survive a soft reset: simply reverting to 0....
What I was looking for was some way of disabling the Proximity Sensor (PS) altogether: because (i) I'm deaf, & I therefore Bluetooth all calls directly to my 'hearing instruments'; & (ii) I've just bought a case which covers the darned thing (meaning the PS) up, permanently locking the touch-screen when it's on! (Aargh.)
Having spent the last couple of hours (plus) searching the TP2 forums on here (& a related one on PPC Geeks...), I've discovered that: (i) lots of people are having PS-related problems; (ii) some of these problems are to do with TouchFLO 3D; (iii) some may be related to various forms of screen-locking; (iv) some may even be caused by other tweaks or hacks we've carried out; & -- last, but not least, as lots of other proud TP2 owners have bought similar cases -- (v) I appear to be the only one having this particular problem (...probably caused by (iv)?)!
It's as if my particular sensor thinks my ear is permanently glued to the screen... -- I can operate all the buttons & the keyboard; but the screen (even though I can turn it on with the power switch) just will not respond while the case is attached (& therefore covering the sensor...).
If anyone has any ideas -- apart from drilling a hole in the case, somewhere (randomly) to the left of the HTC logo... -- please let me know!
Thank you for reading...
- $.
PS: I have a UK-spec., unbranded, GSM Touch Pro2 (...not that this seems to make any difference); & I've already tried turning off any locks & PINs (& changing their duration), as well as the owner information screen....
Forget the Curtain.
This enables your proximity sensor even when you are using your BT
leepriestenator said:
Forget the Curtain.
This enables your proximity sensor even when you are using your BT
Click to expand...
Click to collapse
What is this CAB doing? Because I am also interested in adding support by the Proximity Sensor in TouchLockPro. So how can I start programmatically the proximity sensor? Just changing a registry key
leepriestenator said:
Forget the Curtain.
This enables your proximity sensor even when you are using your BT
Click to expand...
Click to collapse
It works 。Thanks

screen dims/brightens when I scroll

I notice this in opera, and today in the facebook app too, and was really baffled. The effect is quite subtle, but repeatable. When moving my finger around the screen, eg on the bbc news website panning to the top left, my screen dims. It stays dim when I remove my finger, and brightens again when I pan back down to the right.
Weird, huh?
So far it's just a curiosity and not an annoyance. Has anyone else seen this?
So I am not the only one who noticed this. I sometimes find this behaviour a bit annoying, especially in low light.
The phone has an ambient light sensor. It is adjusting because you are causing a shadow over it.
You can probably turn it off
Under the power settings/backlight - auto adjust backlight. Just uncheck it.
Any idea where the sensor is located?
Do you really think it is the ambient/light sensor? I sure don't. Scrolling through different websites I can easily reproduce this:
You scroll from one point to another, this just has to be a couple of pixels, and the screen adjusts the brightness. That is within a room with a fixed source of light and I am keeping my body as constant as possible to avoid the shadowing.
Scrolling from point A to point B makes the backlight adjust itself, even without casting any shadows or similar. Scrolling back from B to A makes the backlight instantly adjust itself back.
It's your finger causing the shadow, not your body. If you introduce an object into an ambient light source, you will find that said object will reduce the ambient light by a percentage due to partial or total obstruction. The light sensor is detecting this percentage and adjusting the screen accordingly.
The sensor itself is somewhere near the speaker.
I'm pretty sure this doen't have anything to do with the light sensor UNLESS it's cause by the screen itself becoming brighter and this registering on the light sensor, eg internal light leak.
My best guess is that it's connected to the presence/absence of certain colours on the screen, and is related to the video driver. Next time I get it I'll see if I can reproduce when scrolling via the kbd, to eliminate the theories about casting shadows on the screen.
This is not FINGER SHADOW!!!
You can notice this same thing when you plaing Solitare cards and using Stylus.
I'm sure i did't do any shadows and anyway when i pick up any card and moving aroud screen u can notice screen brighting up and down.
Using Opera 9.5, on this site http://game-board.blogspot.com/2008/05/alternative-monopoly-rules-and-game.html zoom in with double-click, scroll about half way down to the paragraph beginning "property has too much pollution on it", then scroll up and down and notice the change in screen brightness. please post if you can repeat. it does not work with the keyboard.
btw, does anyone know monopoly "bloodbath" alternative rules?
I've noticed my screen doing this without causing any shadows & without even touching the screen at all, like a 'breathing effect' when it is completely idle. I think it has something to do with light sensor polling interval which is editable via the registry, advance config and HD tweak...but since I flashed NRGZ ROM (21/08/09 build) this issue has gone anyway.

Light Sensor request for HTC Blackstone / Touch HD

I am looking for a light sensor solution like on the IPhone. If u get a call and you put the phone at your ear, the phone screen gets dark, thats normal,
but what is, if I want to turn on speaker or something during a call? I allways have to press the ON/OFF button.
At the Iphone, they got a better solution for that.
Can anayone manage a little plugin cab or does anyone know a registry solution?
you need Touch_InCall_Screen_Tweak, It can do what you want but it is not using the light sensor.
It uses the G-Sensor, when the device is not in vertical position (closed to your ear), phone will wake up automatically and sleeps again when you take it close to your ear to speak (vertical position).
thank u for your reply, but I want a light sensor app.
Am not sure
but there isnt a light sensor in the blackstone to start with
eI am looking for a light sensor solution like on the IPhone. If u get a call and you put the phone at your ear, the phone screen gets dark, thats normal,
but what is, if I want to turn on speaker or something during a call? I allways have to press the ON/OFF button.
At the Iphone, they got a better solution for that.
Can anayone manage a little plugin cab or does anyone know a registry solution?
Click to expand...
Click to collapse
+1 for that
Am not sure
but there isnt a light sensor in the blackstone to start with
Click to expand...
Click to collapse
i think you'r wrong m8 ... From what i know there is a light sensor in blackstone
the blackstone has a light sensor next to the ear speaker. It is oossibble to turn it on. but wehen you remove it from your ear, the light does not turn back on
Search for "PocketShield", this program has the requested feature, and much more.
yes, 3.0 is very cool
bouwew said:
Search for "PocketShield", this program has the requested feature, and much more.
Click to expand...
Click to collapse
Pocket Shield is not freeware and is definetly not what I want.
I just look for a solution auto-lock un-lock when you remove or taken to the ear.
Microsoft developers will read this thread and bring it into new builds.
Ok, try this one. It seems to be available for free or at least the minimum version ,the full version is around the 7 $. You can measure the Brightness at your workplace, in rooms, use it for Photography or to set up aquariums and terrariums. Works fine although I use it just like for fun maybe is useful for your work.
http://www.pocketpc-software-downlo...-for-htc-touch-diamond-download-ygwklytx.html
The software is called Kai's Luxmeter pro 1.2
Rocheau said:
Ok, try this one. It seems to be available for free or at least the minimum version ,the full version is around the 7 $. You can measure the Brightness at your workplace, in rooms, use it for Photography or to set up aquariums and terrariums. Works fine although I use it just like for fun maybe is useful for your work.
http://www.pocketpc-software-downlo...-for-htc-touch-diamond-download-ygwklytx.html
The software is called Kai's Luxmeter pro 1.2
Click to expand...
Click to collapse
I dont want a Luxmeter, if I want a Luxmeter than I take mToolbox.
I tried Pocket Shield and after uninstalling this program, the light sensor does not work anymore.
Try TICST
really, just try it.
http://forum.xda-developers.com/showthread.php?t=488991
This is what you want to adequately switch the screen off as it comes to your ear and then on again as it comes away from your ear.
I've been using it on a an HD since March/April and it works flawlessly. It even has intelligent options to handle bluetooth calls and control of the speakerphone.
hmmm sounds good but what happens if you get a call at night and there's no light?
Need a combination of light sensor and g-sensor I think.
Yes it has it - please just try it before finding problems with it. It will work for you!!!
NeoXTC said:
hmmm sounds good but what happens if you get a call at night and there's no light?
Need a combination of light sensor and g-sensor I think.
Click to expand...
Click to collapse
Yes this is one of the biggest problems with lightsensor...
Tested the detection range with mToolbox and Lumos - and it shows "0" very early even if there's a bit light around - so the light sensor in-call-detection wont work very good.
How is it solved at iPhone?
BTW:
[APP]Touch InCall Screen Tweak v1.2.0 - Updated 3 Sep 09 - Battery Drain Fix
So it doesn't use the light sensor then?
From v1.0.6 it DOES use the light sense to detect if it is against your ear. This is really a double check to back up the orientation. It doesn't use it to determine if it's away from your ear because the sensor doesn't seem to work when the screen is off, so it's of no use for switching the screen back on.
so - what else you want?
The iPhone doesn't use the light sensor to toggle screen, it uses proximity sensor - it turns off the screen when something approaches the area near the speaker and turns it back on when there's nothing near it.
Light sensor can't work reliably because you can get a call in a dark room.
TICST is a workaround using both the light sensor and the g-sensor, it's rather good but not perfect.
A perfect solution requires hardware that's missing in Touch HD. HTC HD2 will have the proximity sensor so screen toggling will be working there, hopefully.

Proximity sensor and phone

I've got a problem that when I phone my screen goes blank without waiting me to put it against my face and then doesn't come back on again without me having to push the power button.
Any ideas where to start looking. I'm using the standard stock 6.5 WWE ROM.
I believe it uses the ambient light sensor on the front of the device to determine when it is against your face. Make sure the sensor is clean and not hidden under an aftermarket case. The TP2 might also use the accelerometer to determine the orientation of the device, in order to complement the light sensor and better determine when you're holding it up against your face.
So I'd go into the settings and calibrate the G-Sensor as well.
Thanks will take a look at that.
Having an Issue with Proximity Sensor (Can only talk on phone with Keyboard extended)
I am having a proximity sensor issue with my Tilt 2. When the proximity sensor kicks in and the screen goes black, the person i am calling doesnt hear my voice. Only when I move the phone away from my ear or extend the keypad so the 'lights stay on' does the other person hear my voice.
What can i do to force the light to stay on even when its up to my face.
where is this sensor located on the front of the phone? I am wondering if my screen protector is causing it. I have no clue
Helo,
Same problem here.
Any help?

Touch screen problems? Maybe actually proximity sensor (which is terrible).

One of the touch screen issues I sometimes experience is when swipes are "broken" and register as shorter swipes and taps. This makes me think maybe the accidental touch protection, which is supposed to be triggered by the proximity sensor, is being triggered when it shouldn't. We all have read complaints about how the proximity sensor does not work very well.
So on a hunch, last time I had this issue (trying to swipe in gboard), I stuck my finger on the front-facing camera, and interestingly, swiping worked fine (I expected the screen to be disabled - guess that only actually is supposed to happen when you're on a call?).
Since this issue is so random it's hard to really test it. But I've had quite an experience with the proximity sensor.
I wanted the AOD to turn off when the phone is in my pocket, which is the norm on other phones I've used but for some reason Samsung does not do. So I set out figuring out how to do this in Tasker. I got a sensor test app and noticed the proximity sensor basically has two values: 0.0 and 5.0. It is very slow to respond (slower for "uncover" events) and seems to only switch to 0 if my finger is right on the camera. So I set up Tasker to turn the AOD off if the proximity sensor value is < 1, or on if it is >= 1. I also made it vibrate briefly so that I could tell when the sensor was toggling even if I couldn't see the AOD.
At first it worked fairly well. If I manually covered and uncovered the camera, the AOD would dutifully toggle (not instantaneously). But in "real life" practice, it turned out to be quite unreliable. There would be phantom proximity changes while I was using the phone or carrying it -- most interestingly, it often toggles the AOD off briefly when I pick up my phone -- but I didn't really notice any surprise vibrations while the phone was in my pocket. After a couple hours, when my living room got darker (not completely dark), the whole thing went crazy and the AOD would toggle every few seconds with the phone sitting on a table.
So I think the whole "let's ditch a dedicated proximity sensor and use other things to get the same result" is not quite mature yet. And perhaps it is buggy enough to cause one of the issues we think of as a touchscreen one.

Categories

Resources