/system/bin/sensorserver_yamaha aka the magnetic sensor is always running when the phone screen is on (its off when screen is off) and using like 5% of cpu, even when no task requires the magnetic sensor to be used.
ive no idea how to change this behavior, so that either the daemon only polls when the sensor is actually used, or the daemon started only when the sensor is going to be used .. something that wouldnt require making an app that does "on off" of the service
Related
Hey, so I'm not really sure where to post this, but here goes nothing.
To my knowledge, the incredible is not marketed as having a magnetic trigger (a la the Droid), but I have noticed interesting behavior when in close proximity to magnets.
The backstory- I am working on a stealth (looks stock) magnetic mount for my Inc. to connect to my car. (Actually just finished installation and testing... will post more on that later). Anyhow, when I have magnets in the back cover, it seems to disable the accelerometers, thus keeping the device orientation regardless of movement and positioning.
Not sure if this is a hardware deal wherein the magnets physically impede the accelerometers, but using a logging app, it seems that the sensors are actually disabled.
Anybody want to weigh in if I am missing something?
Thanks!
Sent from my Incredible using XDA App
mattjacobson said:
Hey, so I'm not really sure where to post this, but here goes nothing.
To my knowledge, the incredible is not marketed as having a magnetic trigger (a la the Droid), but I have noticed interesting behavior when in close proximity to magnets.
The backstory- I am working on a stealth (looks stock) magnetic mount for my Inc. to connect to my car. (Actually just finished installation and testing... will post more on that later). Anyhow, when I have magnets in the back cover, it seems to disable the accelerometers, thus keeping the device orientation regardless of movement and positioning.
Not sure if this is a hardware deal wherein the magnets physically impede the accelerometers, but using a logging app, it seems that the sensors are actually disabled.
Anybody want to weigh in if I am missing something?
Thanks!
Click to expand...
Click to collapse
It makes sense that it would at least mess with them if not totally disable it. I'd also wager your compass will be unusable.
What *I* want to know is if there is a way then that the device could determine if it's a magnet. Could use that to trigger a car-dock type of mode?
Well I assumed that it would affect my compass (weighed the consequences, but I hardly ever use it).
The interesting thing to me was that it didn't just throw everything off, it seemed to disable the sensor's output.
You bring up a good idea tho, perhaps turning on a program based on the sensors not returning values (given that my earlier speculation is accurate). My plans thus far was going to have a tasked widget activate my "car mode", but this could be interesting.
Sent from my Incredible using XDA App
Couple of tests with SensorsTest and GPSStatus apps and yeah.. the magnet does for sure disable the compass (locks it on East). And definitely breaks the orientation sensor. BUT I wonder if GPS nav needs the magnometer reading for heading anyway.
Even a little whiteboard magnet put just below the speaker on the back cranks the magnometer readings to fly up to 1000-2000.
I should get my ass in gear and see if I can't write a "car dock" app like we're describing and have it not break anything.
I should also contact HTC and see if prolonged exposure to a "strong" magnet will break the sensor.
I dont know if this is an issue with other handsets.
I installed proximity screen off application . The purpose was to have the phone turn the screen off when i close my flip case.
However i found something strange.
When the flip case is very close to the screen the proximity sensor does not seem to detect that there is something covering it.
Is this an issue with every one ?
Any solution
Please see the videos
As you can see from the videos when i bring the shield very close the proximity sensor does not seem to detect the sheild.
Edit : However if u use ur finger this is not seen
I've noticed the same behavior, it's quite annoying because it kills one of NoLed's best features (screen off using prox. sensor).
[deleted]
Still really annoying that the original flip cover won't work with the proximity sensor. A workaround might be a third party flip case. A diy modification of to the original one won't work since if I close it AND hold whatever object that alone is enough for a positive result over the flip cover, the sensor will still not register positive [because a minimal distance between an object and the glass surface is required, see below].
mine works even with a finger...
I've done it a few times accidently when i was trying to access the notification bar while on the phone
ph00ny said:
mine works even with a finger...
I've done it a few times accidently when i was trying to access the notification bar while on the phone
Click to expand...
Click to collapse
Thats the thing i was saying.
With finger i works great even if u touching the screen
Dial *#0*# and press sensor. If it vibrates, the proximity sensor is registering an object.
Maybe it comes in handy with testing.
It's working for me, thanks for the tip about the app!
edit:
Okay, I tested and found that indeed when you set the app to:
"Cover an hold to lock the screen" to say 5 seconds.
Close the flipcover.
It does not register.
However. If I set:
"Disable Accidental Lock" to .25 seconds.
Close the flipcover.
It works quite well.
Coming back to the sensor. It indeed does not register the flipcover when it's closed and touching the screen.
Weird thing is it does not register your hand anymore either.
Recreating issue:
Remove flipcover and lay it completely flat over the sensor.
Dial *#0*#.
Press "Sensor".
No registration.
Now hover your hand over where the proximity sensor is, and... How about that, no registration.
This indeed messes up NoLed's battery saving feature.
This can also be a problem when:
You set screen timeout to 10 min.
In the app's settings set "Disable in landscape" to on.
Then use an app in landscape mode.
Close flipcover while in landscape mode.
Then rotate to portrait. At this point it should start registering again and turn off screen..
The sensor does not register and screen stays on.
Drains battery.
It is a really cool idea, but it does not function properly.
It's too flaky, also when just handling your phone. I find myself accidentally turning off the screen.
Maybe if you use a case or some other cover with a different or thicker material it would work better.
I ordered a Zenuscase, I'll give it a try with that one.
Don't know how long it'll take to arrive though
reflective color
heey i found the problem , the sensor is working fine ... but when so close with any black object the light is not reflected back to the proximity sensor.(black color absorbs light).
Repeat your video with any white object and you will notice the difference..
Now i am using Autostart and it works great with samsung original flip cover (white flipcover).
you can use any white sticker on the black one.
ahmedtaha7 said:
heey i found the problem , the sensor is working fine ... but when so close with any black object the light is not reflected back to the proximity sensor.(black color absorbs light).
Repeat your video with any white object and you will notice the difference..
Now i am using Autostart and it works great with samsung original flip cover (white flipcover).
you can use any white sticker on the black one.
Click to expand...
Click to collapse
ya correct, just few day back i have asked this issue to developer
http://forum.xda-developers.com/showpost.php?p=22170417&postcount=5
But it will work perfact if you use proximity + light both sensor enabled.
Color has no influence, distance between an object and the proximity sensor is what matters. I've just tested this using pieces of paper, cloth, metal and wood in white and black colors. The sensor seems unable to correctly register anything that is less than approximately 1 mm away from the glass (it may report 0 cm or jump to 5 cm). Also it seems it only reports changes of a certain minimal distance between two readings, even if the reported value remains the same as the old one. Anything below the threshold of the 5 cm reading will always result in a reported value of 0 cm, but if the effective distance between reading A and reading B was below a certain threshold, the sensor will not report a new reading of 0 cm (thus an object hovering stable over the sensor will not produce a 2nd post). I'm not sure if the sensor has a state that can be read at any time. From my tests using AutomateIt Pro, it seems only new posts can be used by apps. And if the delta between two readings is to small to make the sensor post a "new" result, then this can be problematic under certain circumstances (like trying to turn the screen off after the flip cover got closed (prox. sensor = 0 for 0 sec) and stays closed (light sensor = 10 for 5 sec) while preventing the screen from going off after an accidental wipe over the prox. sensor e.g. with the hand).
@Dr. Ketan: I've tested Power Switch (again) and I'm quite certain that for the Note + Flip Cover it only works through the light sensor (which is unsatisfying since it then won't work correctly in the dark). Covering the proximity sensor only doesn't make the app reliably react.
Power switch works ok for me with the Samsung flip cover. I have the confirmation set to minimum Abe theactivation delay set to 0 seconds.
It doesn't always work from the lock screen but works fine from the home screen or apps
Sent from my GT-N7000 using xda premium
so is it a hardware issue of software?
might it be fixes in ICS? it's fu***ng annoying! just bought the flip cover(black) yesterday and also bought smart cover app, my note's screen keeps on turn off (when flip closed) then it turns back on (flip still closed)!
Any solution for gingerbread? like proximity calibrator perhaps? (while waiting for final version of ics to come out)
Power switch will work if you use proximity + light sensor both.
Sent from my GT-N7000 using xda premium
dr.ketan said:
Power switch will work if you use proximity + light sensor both.
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
It's so sensitive that the moment my finger move over the sensor, the shutdown menu pops up.
Any app that works with the flip cover?
Hi everyone,
since a few weeks i got problems with the proximity sensor on my i9505
First i thought that it is software related but after clean installing a new ROM yesterday i see that the problem still exists...
It happens when the proximity sensor should react, when i am close to it, it reacts and activates but the problem is that it wont turn off again...
i dialed the test menu and went to sensor test, as i see the sensor sees the distance normaly, when i bring it close and when i move it away i see that the numbers react how they should, however after the sensor is once trigerred with a close object it starts to vibrate and the screen turns green (how it should), but after moving away it registers the distance but it won´t stop to vibrate and turn off :/
Anyone who knows what could be wrong?
I have to mention that the display was changed once (because of the glass broke) but it was working normal for months...
EDIT: after testing again i see that the sensor sees the distance just as it should the only problem is that once that the sensor action is triggered to 1.0 from 0.0 it stays at 1.0 no matter if i remove my hand...
Hi guys,
I need my app to check if the phone face is covered when the screen unlocks.
I've acomplished this by creating a service to get datas from the proximity sensor. The problem is that it isn't energy efficient as the proximity sensor is checking non-stop until the screen is turned on.
Is there any better way to accomplish this or other sensor to use just to verify if the phone is covered by the moment when the screen is turned on?
Thanks!
This information is for Version 3.0 of the application Proximity Sensor and Screen by Steven Stanley Bayes.
This application allows to really and virtually disable the proximity sensor while in calls, made and received and to re enable at will. This application does not require any third party software in general. However, only one menu selection, which really disallows the proximity sensor when in calls, made or received, requires XDA Framework and Xposed Installer and Xposed Jar. The application will work without these too.
There are no specific installation instructions. The application can be downloaded from GooglePlay : https://play.google.com/store/apps/details?id=stevenstanleybayes.proximitysensor in a standard way.
The application can also be downloaded from the posted in this information link. Then, the application APK file will be downloaded to the device's Download or Downloads folder and the user must go and manually click the APK file in order for the application to be installed on the user's device.
There are many more web sites where the application is available for download.
This application allows the user to make and receive calls with proximity sensor disabled and or or directly with speakerphone powered thus the proximity sensor will not power the screen down. This application also allows the user to select the proximity sensor to control the screen. The screen can be selected to be always powered or not.
When the speaker when in call is chosen, all calls made and received will be made with a powered speakerphone and the proximity sensor will not power the screen down when a call is made or received. The volume of the speaker can be adjusted to preserve battery energy. The device can be put in a zip bag and run while in the zip bag without taken out. This is great for wet weather and in a dusty and unfriendly environment. This also is a great health and personal hygiene option as the device will not be contaminated by ear wax and other sources of contamination and bacteria.
When proximity sensor control is chosen, the screen of the phone powers down when there is an object close to the proximity sensor. Thus, the screen will automatically power down when the phone is put in the pocket or put screen down on the table. This works regardless whether the user has chosen to keep the screen to be always powered or whether the screen is normally controlled by the OS. When the phone is away from and object, the screen powers automatically unless the screen has previously been powered down not by the proximity sensor but by other means, such as the OS or a press on the Power Button.
When the screen has been chosen to be always powered, the user can use the phone as a flash light which can easily be turned on by, say, placing the phone close to the chest. This way, the user can shine light for a while to see around, then, quickly stop the light and then, whenever needed, to quickly turn the light on again with just a movement of one hand and not by the power button although the power button will also work as set up. This way, the user would save battery energy as compared to constantly flashing light which may not be needed. The power button still works but the proximity sensor, when used as a switch, is easier to use than the power button.
More information is available in the application.
XDA:DevDB Information
Proximity Sensor and Screen, Tool/Utility for all devices (see above for details)
Contributors
StevenStanleyBayes, Rovo89, StackOverflow and XDA as well as other forums
Source Code: http://www.steven-stanley-bayes.com/ProximitySensor.apk
Version Information
Status: Stable
Created 2015-08-16
Last Updated 2015-08-17
Proximity Sensor and Screen Version 3.0 APK
Attached is the APK file of Proximity Sensor and Screen Version 3.0 APK for one click downloads from this post.
Attached is Version 4.0 of the application which offers a new interface as well as a shaker control of the screen with the accelerometer.
Version 4.0 of this application allows to really or virtually disable the proximity sensor while in calls, made and received and to re enable at will with a click and without restarts. This application also implements a shaker control of the screen as well as a proximity sensor control of the screen. This application does not require any third party software in general. However, only one menu selection, which really disallows the proximity sensor when in calls, made or received, requires XDA Framework and Xposed Installer and Xposed Jar. The application will work without these too.
man, can u tell me if u can implement or do u have any idea how to enable check proximity sensor and disable power button while is in pocket ? thank you
op3n said:
man, can u tell me if u can implement or do u have any idea how to enable check proximity sensor and disable power button while is in pocket ? thank you
Click to expand...
Click to collapse
This application will allow you to use the proximity sensor as a switch : when you put your device in your pocket, the screen will be powered off.
The best place to download the newest version of the application is : https://play.google.com/store/apps/details?id=stevenstanleybayes.proximitysensor&hl=en
StevenStanleyBayes said:
This application will allow you to use the proximity sensor as a switch : when you put your device in your pocket, the screen will be powered off.
The best place to download the newest version of the application is : https://play.google.com/store/apps/details?id=stevenstanleybayes.proximitysensor&hl=en
Click to expand...
Click to collapse
thanks Steven, but i already have xposed additions options; i observed that any app which will be installed even if is a module for xposed will drain battery bcs must stay all period waked. i have right? for that i search a script or somthing to implement without be an app. do u have any ideas?
In order to use the proximity sensor as a switch, of course, the proximity sensor must be on in order to detect any changes. Hopefully, the proximity sensor should not take too much power, however, the proximity sensor emits energy in order to evaluate the reflected energy, so, yes, there would be some energy consumption.
There is no physical way to use the proximity sensor as a switch and not to consume energy. Ideally, the programmer would be able to adjust the sample frequency and sensitivity but neither Android nor some device manufacturers are so smart.
Hopefully, the other sensors are off when not used. I do not recall to have used other sensors when not selected on the menu but I may have because the manufacturers and the Android have not made the proximity sensor control very reliable and I have experimented with many methods to trick the Android to ensure reliable way of the proximity sensor control.
Android may keep all sensors awake when only one is used but I do not have control over this.
A way to minimise the energy consumption is to use the accelerometer shakes as a switch. The application allows this. However, this is risky because any similar shake, such as bus ride, bicycle ride, etcetera, can be mistaken for such.
The only way I can think of to do what you ask without theoretical energy consumption is to use the light sensor ( photodiode ( s ) ). However, in case you use so, then, in the evening and night, the light sensor would think the phone is still in your pocket when not because there is not enough light. Also, light can penetrate through your clothes and very strongly through thin cotton, so, to even try to play with level adjustment may be unreliable. This is why I have not implemented the light sensor and I am not even happy with the not so high reliability of the accelerometer but I have decided to use the accelerometer with many levels of sensitivity.
I do, however, think Android would not use the proximity sensor constantly and would have a very low sample frequency of the proximity sensor data and thus there will not be very high energy consumption, definitely, the energy consumption of the proximity sensor would be negligible as compared to the huge consumption of the colour screen, so, you will add another few percent every 24 hours : not so much. Also, you do not need to run this continuously but only when you are mobile. When you are at home or work, you do not need to run the proximity sensor as your device usually stays away from you.
Another possible way to slightly lower the consumption is to programmatically switch the proximity sensor on for, say, 100ms and, then, to switch the proximity sensor off for, say, 100ms which the previous status of the screen is kept. This would reduce the energy consumption, but, I am not sure whether Android would switch the proximity sensor off immediately upon request.