Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Proximity Sensor during call

I dropped my phone and looks like my proximity sensor no longer works reliably. It returns Near all the time. The problem is, the display turns off during call and I wont be able to use the number pad to enter pin or conference another call, or even disconnect the call. I found the Power button disconnect option in Accessibility settings and uses that now.

I tried to create an app that tries to obtain a full wakelock when a call is received hoping that it will keep the display on.

  • Created a broadcast receiver that invokes a service when the phone state changes to OFFHOOK

  • The service acquires a full wakelock and releases it only when phone state is IDLE.

But still, proximity sensor turns the display off. I used the isHeld() method to make sure that the lock is acquired. I used PowerManager's isScreenOn() method and it returned true even when the screen was off during the call. I tried to obtain the wakelocks every two second in a loop for testing, still the display won't come up.

I'm using a Nexus 5 Android version 4.4.4

Can anyone suggest an idea to override the proximity sensor behaviour? A root-required option is also fine.

Thanks!

like image 570
jobinbasani Avatar asked Jul 27 '14 15:07

jobinbasani


People also ask

How do I turn on proximity sensor during call?

Android 6.0, 7.0, 7.1 or 7.1.From your Home screen, tap the Application screen icon. Find and tap Settings → About Phone → Support. If this is the first time you start Support, tap ACCEPT to accept the privacy policy. On the Test tab, scroll down and tap Ear proximity, and follow the on-screen instructions.


2 Answers

After trying a whole bunch of fixes including:

  • Phone app's menu option (my phone did not have a option to disable)
  • Proximity Screen Off Lite (did not work)
  • Xposed Framework with sensor disabler (works till phone is rebooted or app updates)
  • Macrodroid macro (Macrodroid does not run on my phone for some reason)
  • put some tin foil in front of it?(i don't know what i was thinking)

Here is My fix: I figured you cannot break it more so I opened up my phone and removed the proximity sensor all together from the motherboard. The sensor tester app now shows "no_value" where it use to give "Distance: 0" and my screen no longer goes black after dialing. Please note I can only confirm this working on a Samsung I8190 Galaxy S III mini with CM MOD 5.1.1. Here is a picture of the device i removed: prox sensor I have removed it using a SMD solder station's heat gun at 400 degrees, some tweezers and flux.But a sharp hobby knife might work too.

like image 132
DarkPh03n1X Avatar answered Sep 28 '22 05:09

DarkPh03n1X


I also had problem with proximity sensor (I shattered screen in that region on my Nexus 6, Android Marshmallow) and none of proposed solutions / third party apps worked when I tried to disable proximity sensor. What worked for me was to calibrate the sensor using Proximity Sensor Reset/Repair. You have to follow the instruction in app (cover sensor and uncover it) and then restart your phone. Although my sensor is no longer behind the glass, it still showed slightly different results when covered / uncovered and recalibration did the job.

What I tried and didn't work? Proximity Screen Off Lite, Macrodroid and KinScreen.

What would've I tried had it still not worked?[XPOSED] Sensor Disabler, but it requires you to be rooted and have Xposed Framework, so I'm really glad I've found the easier way.

like image 33
tlegutko Avatar answered Sep 28 '22 03:09

tlegutko