I currently make an XDA application where I need to access the proximity sensor. I need help with information on which methods and data Android uses to access the sensor.
I know values in the SensorManager class show the proximity sensor readout but I am not sure whether this is what Android uses or there are other as well as I am not sure whether I can override these values to be visible to the whole system and to make sure there is no any app, such as the Phone app, which reads data from anywhere else, for example, directly from a hardware register.
Please, be kind to respond with what Android and the Phone app use to read the sensor.
Thanks.
I never played with Proximity Sensors but your post made me curious. Did you see this example?
ttp://androidbite.blogspot.com/2013/05/android-proximity-sensor-example.html
I have seen http://androidbite.blogspot.com/2013/05/android-proximity-sensor-example.html. This is a standard application which uses the proximity sensor as per the OS. I have tried standard ways to access the proximity sensor. They all work fine EXCEPT the most important thing : they cannot disable the proximity sensor when call is made or received. The phone application is very strong and does not seem to play by the standard rules. This is why I have to do something with Xposed. I am not happy to use Xposed also because people are not happy to install Xposed nor do they care to root their phones. However, there is no other way.
This is why I ask for information on data and methods used to access the information of the proximity sensor. Obviously, the lowest the level, the better, I. e. the closer to the HAL and hardware the better but any information is appreciated.
Related
I remember (but not for sure) a settings page that gave you the ability to test different sensors and what-not. the reason for my question is because when i make a call the proximity sensor doesnt work, and i wanna know is it because of the rom or anything software related, or is it the sensor itself, since i recently had repair done on the screen.
thanks.
Nobody knows? i got a 30-day warrenty, so if my proximity sensor really isnt working i need to know soon.
I've used an app previously that would display raw readouts from the various sensors in the device, including the proximity and ambient light sensors. Stand by while I try to find what app that was...
In the meantime, you can at least verify that half of the sensor is working by looking at the screen through a digital camera or other phone's camera. The proximity sensors works off of a flashing IR LED that you should be able to see through a digital imaging sensor. The sensor is located to the left and below the speaker.
Also, I believe the application I was using is called "Elixir", and is free on the Market.
Thanks man, great app. everything is working ok now.
Hey guys. I have looked around and can find no info on some of the tabs sensors. From what i understand the chipset is straight out of the galaxy s phones, which is the reason i see the existence of a proximity sensor but dont see any data from it.
Anyone have a clue whether it actually exists?
chipset and sensors are different things....even if the chipset supports a certain type of sensor doesn't mean it should be there if there is no need to be there.
galaxy tab doesn't need a proxy sensor cause you are not going to put it beside your face when calling...
triplex76 said:
chipset and sensors are different things....even if the chipset supports a certain type of sensor doesn't mean it should be there if there is no need to be there.
galaxy tab doesn't need a proxy sensor cause you are not going to put it beside your face when calling...
Click to expand...
Click to collapse
Doesn't need and doesn't have are different things. Point is, if it was stated that the tab has a proximity sensor, where is it?
I'm pretty sure it has one, in the unofficial CM build Technomancer says he fakes i at 10CM
There is no proximity sensor in Galaxy Tab.
My CM7 sensors driver pretends there is one and reports 10CM distance so the Phone app behaves better.
Thanks mate, that's what you said in the last thread back in October, but why do all the sensor pingers see it? Are they checking code rather than hardware?
Also, is there a working, sensitive light meter anywhere for the tabs ambient light sensor? The couple I've tried refuse to work...
There is working light sensor in the Tab. Both my CM7 and Samsung ROMs support it just fine. It has range from 0 to 6000 Lux snapped to one of several levels in the kernel driver. You can actually read it from sys interface.
The proximity sensor in my CM7 sensors driver is just software reporting constant 10cm to the system. The sensors test apps in my CM7 (I uses Sensor Test and Plot http://www.appbrain.com/app/sensor-test-and-plot/com.golborne.android.SensorTest) just reports 10cm from my fake sensor.
I think there is some leftover code in Samsungs sensors driver that may report presence of proximity sensor.
Yep, i use it as well, but my issue is with the three avaliable states the driver seems to report.
I get 5, 22 and 75. Are there only three levels then? And no way to modify them outside the kernel?
I can get up to 6000lux using strong LED flashlight directly on the sensor.
There is another sys device that can read unprocessed data that has values not snapped to 5,22,75 etc... but Samsung's driver uses the snapped device (and so is mine).
This is very annoying... im trying to make an app that needs a proximity sensor to work as intended so the light sensor as well as the sleep mode implementation are really no substitute.
In any case, im sure it will be quite usefull for all tablet owners running 2.2 and up and using a case. I will have a closed beta for xda members by the end of the day, so people can test it over the weekend.
Would you like a shot, mancer?
I don't know what would you do but if I understand why not to use the g-sensor ... just like in samsung omnia...put backwards enable silent courtesy mode.
the proximity sensor will be useful if you use the leather case to close the screen when touches the screen , like ipad 2 and galaxy tab 10.1 V they have proximity sensors , but i noticed that the sensor exists using sensor applications they see it exists but not giving readings
Hi - there is no sensor, the sensor list showing it is just a glitch from the galaxy s motherboards. And the functionality youre describing is already available in my app Killswitch - you can get both the lite and full version from my signature...
ftgg99 said:
Hi - there is no sensor, the sensor list showing it is just a glitch from the galaxy s motherboards. And the functionality youre describing is already available in my app Killswitch - you can get both the lite and full version from my signature...
Click to expand...
Click to collapse
Thanks I already bought it from market and it's great
Sent from my GT-P1000 using XDA App
Great! Im working on an update that will help improve the accuracy of the light sensor functions... been getting some flack for not updating it
Watch this space!
Hello i found out my N1 Proximity sensor have issue wen a install 2.3.3 my screen shutoff when i do call and stuck blank screen i have to remove the battery and put the back.
i download Elixir App and doing some test and Sensor only Say "NEAR" I put my hand on the screen still say Near...
/etc/permissions
android.hardware.sensor.proximity.xml
android.hardware.sensor.light.xml
/system/lib
libssensorservice.so
Factory Code Nexus One
#*#0588#*#* Proximity sensor test (no work in my N1)
can i restart the sensor?
can i disable Proximity in DIAL ?
do i need to take tHTC Support N1?
where is the CM3602 on N1?
can i fix my self?
and I have the same problem but no answer :-(
___
http://forum.xda-developers.com/showthread.php?t=707234&highlight=nexus+proximity
Hi,
Have the same issue, too !
hmm, looks like a android 2.3 issue on that one....
The same here. Is there any way to do a downgrade to 2.2? The phone is unusable, I'll have to go back to my old Nokia!!
Also, at the same time, when I plug the earphones on the Nexus, it doesn't detect them and continues playing through internal speaker!! And I suspect that the light sensor doesn't work.
Hasta luego.
Nexus one proximity sensor problem
Hi guys i had the same problem with my phone
and I manage to fix it
I open the phone and check where the proximity sensor was
and clean it with the a spray duster they sell in computer store
I clean the entire phone
put i back together and it was fix
thanks me if it works for you like that
You are lucky,, just opened my phone and cleaned the proximity sensor and light sensor with specialized electronics solutions i borrowed from work and nothing happened,,dont know what to do about it
RE: how to disable proximity sensor
hey there, this is my second post, THIS PLACE IS AWESOME!!! I was able to disable my nexus one proximity sensor using the hex edit method (after granting the app root access) and now a brick to be is no more. thank you to the poster who made the original post and the one who mentioned the way to give hexedit root access. my sensor definition was exactly where he said it would be. the name of course was cm3602 (lowercase, looking for uppercase found nothing) I was able to change hex position 0000323d from 32 to 00 , and poof, no more black screen after dialing or when receiving a call. a temporary solution I was using was to use a bluetooth headset.
Thank you all.
My proximity sensor seems to have stopped working (always gives a value of 0.0) as a result whenever a call is placed the screen goes off and i cant do anything at all, cant even end the call. This seems to be hardware problem, as cleaning the area is not helping.
Is there a way to disable the proximity sensor completely/permanently?
The only working way i found was using the "Hardware Disabler" app in play store and disabling /sys/bus/platform/drivers/proximity, but that makes the phone as slow as hell. How would I go about deleting this folder otherwise? Root Explorer is not allowing me to do this.
All the other solutions i found on the net do not help (using proximity recalibration, adding lines to build.prop, putting a script in init.d - Though perhaps I am not using it correctly).
Someone please help. The problem is driving me crazy.
Note: using CM9.0 RC2
Nobody has any issues with the proximity sensor on their phones?
And is there no actual way to disable it?
nobody here who can help?
manish_bhaumik said:
Nobody has any issues with the proximity sensor on their phones?
And is there no actual way to disable it?
Click to expand...
Click to collapse
I still need help on this?
Hi, last time I tried MIUI rom and iinm there is an option to disable the proximity sensor. But, if you doesn't like MIUI.. I am don't know any other workaround for it anymore.
Or try some different ROM to make sure if it is actually hardware issue or software issue.....
Use miui rom and press on dial and then menu...Again press on setting and Answer setting .. You will find there the option to disable proximity sensor..
Hi all,
troubleshooting for a girl with a Bionic; replaced cracked glass/digitizer for her and updated to JB via the OTA update, but her proximity sensor is flaking out.
I've installed a few Prox. Sensor reporting apps to see what values it's putting out: it reads 3cm most of the time, and 100cm when swiping down the notification bar. (100cm is max range, which I assume is a placeholder for a no-report state in the phone, not sure what it has to do with the notification bar.)
Problematic behaviour is that the screen turns off almost instantly after placing a call, and won't come back on except by swiping down (on the blank screen) to pull down the notifications, which temporarily disables the sensor. (it lasts long enough to get ~1 keypress on the keypad, which is *not* a usable workaround even for checking voicemail.)
I'll take the phone apart again and make sure there's nothing in the way of the prox. sensor, as that seems the most likely cause... but any guesses or similar reports from anyone about possible bugs in the firmware update? Any proximity sensor calibration apps for this hardware I'm not seeing in the marketplace, or ROMs that expose that functionality? (I wasn't planning to root the phone, but she won't know the difference if I need to. Was hoping to avoid safestrap to simplify the boot procedure and not interfere with future OTA updates, but warranty is gone already so it's not a big deal if I need to install something new.)