Android Enthusiasts
Q&A for enthusiasts and power users of the Android operating system
Latest Questions
1
votes
0
answers
33
views
Proximity sensor issue on receiving telephone call
This is related to an issue with Android custom ROMs on the legacy device the LG G4, since the move to A12 and A13. This doesn't occur on any version below A12. I need your help with debugging the black screen issue on telephone calls in A13 on the LG G4. As soon as we accept a telephone call, the s...
This is related to an issue with Android custom ROMs on the legacy device the LG G4, since the move to A12 and A13. This doesn't occur on any version below A12.
I need your help with debugging the black screen issue on telephone calls in A13 on the LG G4.
As soon as we accept a telephone call, the screen goes black, and the only way to interact with the phone is via the power button.
There is some issue with the proximity sensor on this device since A12+.
However, any testing app I have used states that the proximity sensor is detected and works correctly but no ROM seems to make use of it.
We have been doing a lot of testing to help try and find a root cause.
We noticed that if the headset is plugged in, the black screen issue doesn't occur. This behaviour is explained in [ProximitySensor.java](https://github.com/LineageOS/android_packages_apps_Dialer/blob/lineage-20.0/java/com/android/incallui/ProximitySensor.java#L205) :
>Proximity wake lock will be released if any of the following conditions are true: the audio is routed through bluetooth, a wired headset, or the speaker; the user requested, received a request for, or is in a video call; or the phone is horizontal while in a call.
We took some logs of phone calls, and I noticed, when filtering on proximity in the logs, we have two different situations:
- telephone call with headphones (log filtered by proximity)
=> screenOnImmediately: true
- telephone call No headphones (log filtered by proximity and PID of dialer)
=> screenOnImmediately: false
I think we need to debug the code to find out why the proximity sensor doesn't reply correctly, or isn't queried correctly.
I think the important parameter is PROXIMITY_SCREEN_OFF_WAKE_LOCK. See [ProximitySensor.java, line 69](https://github.com/LineageOS/android_packages_apps_Dialer/blob/lineage-20.0/java/com/android/incallui/ProximitySensor.java#L69)
and [ProximitySensor.java, line 198](https://github.com/LineageOS/android_packages_apps_Dialer/blob/lineage-20.0/java/com/android/incallui/ProximitySensor.java#L198) .
I see references to the parameter PROXIMITY_SCREEN_OFF_WAKE_LOCK in frameworks_base and frameworks_native.
Antóin
(61 rep)
Sep 20, 2024, 09:34 AM
• Last activity: Sep 21, 2024, 10:25 AM
0
votes
0
answers
80
views
How to disable turning screen off based on proximity / light sensor?
Problem: Android 13.0.0 turns screen off based on proximity / light sensor. How to disable turning screen off based on proximity / light sensor? I've already tried to find a dedicated setting by searching for "proximity", "light", "sensor", but couldn't find a dedicated setting.
Problem: Android 13.0.0 turns screen off based on proximity / light sensor.
How to disable turning screen off based on proximity / light sensor?
I've already tried to find a dedicated setting by searching for "proximity", "light", "sensor", but couldn't find a dedicated setting.
pmor
(129 rep)
Sep 21, 2024, 08:42 AM
2
votes
2
answers
10447
views
How do I correct my far-too-sensitive proximity sensor?
I have a Samsung Galaxy Nexus (GSM). The sensor that turns the screen off in my pocket or at my cheek is suddenly turning the screen off when my thumb is within two inches of the top of the screen. It is difficult to grab the notification bar without triggering it, and holding my phone sideways is n...
I have a Samsung Galaxy Nexus (GSM). The sensor that turns the screen off in my pocket or at my cheek is suddenly turning the screen off when my thumb is within two inches of the top of the screen. It is difficult to grab the notification bar without triggering it, and holding my phone sideways is now an exercise in frustration.
Is there a way to fix this? Did some update recently come out for this device?
Myrddin Emrys
(460 rep)
Jun 8, 2012, 02:07 PM
• Last activity: Aug 28, 2024, 02:35 PM
1
votes
1
answers
7524
views
Black screen during Whastapp call/audio
My proximity sensor is broken, and, Whastapp turns the screen off during call/audio. Not even power button will turn it back on. All "solutions" out there tell me to clean the sensor. Impossible here. How to disable this completely ? I've tried Xposed's Disable Sensor module, entirely disabling this...
My proximity sensor is broken, and, Whastapp turns the screen off during call/audio. Not even power button will turn it back on.
All "solutions" out there tell me to clean the sensor. Impossible here.
How to disable this completely ?
I've tried Xposed's Disable Sensor module, entirely disabling this sensor or mocking it's values. No results.
I thought about revoking a sensor usage permission for that app, but could not find a module that has such an option
I can't remember if the problem happens during phone calls, but if the fix could be extended to this area, great
Xperia Z3
user113550
Sep 8, 2018, 01:48 PM
• Last activity: Aug 11, 2023, 08:02 AM
2
votes
0
answers
3963
views
Disable proximity sensor on WhatsApp
My Xiaomi phone proximity sensor was broken, it is giving false result, most of the time it think it is blocked when it was not, and its value keeps changing. This affect phone call because the screen is turned off until the phone call is over or I force reboot the phone. I have disabled the screen...
My Xiaomi phone proximity sensor was broken, it is giving false result, most of the time it think it is blocked when it was not, and its value keeps changing. This affect phone call because the screen is turned off until the phone call is over or I force reboot the phone. I have disabled the screen off during call at Apps/System app settings/Call settings/Incoming call Settings to workaround this problem.
However, it looks like WhatsApp is not affected by these settings. My screen is turned off for the entire duration of WhatsApp calls, I can't even end calls due to this, the only way to escape is to force reboot the phone or wait for the other person to end the call.
Is there any way to set WhatsApp to keep the screen on during phone calls? I haven't found the answer on Google, any help is appreciated.
iam1515 2242t
(39 rep)
Mar 12, 2023, 02:54 PM
• Last activity: Mar 13, 2023, 12:01 AM
3
votes
0
answers
238
views
find out what app/package uses sensor
on my device running AOSP something accesses a sensor of my phone continuously, preventing it from going into deep sleep and thus draining battery. Logcat shows the pid, but that just links to android.hardware.sensors@2.1-service.multihal.odin (using adb and ps -p PID) an entry in logcat looks like...
on my device running AOSP something accesses a sensor of my phone continuously, preventing it from going into deep sleep and thus draining battery.
Logcat shows the pid, but that just links to android.hardware.sensors@2.1-service.multihal.odin (using adb and ps -p PID)
an entry in logcat looks like this:
10-10 21:33:18.615 869 954 I android.hardware.sensors@2.1-service.multihal.odin: MIUS:isWakeUpSensor()
10-10 21:33:18.617 869 954 I android.hardware.sensors@2.1-service.multihal.odin: MIUS:run() after post event here
10-10 21:33:18.817 869 954 I android.hardware.sensors@2.1-service.multihal.odin: MIUS:run() before post event here
10-10 21:33:18.817 869 954 I android.hardware.sensors@2.1-service.multihal.odin: MIUS:readEvents() enter
10-10 21:33:18.817 869 954 I android.hardware.sensors@2.1-service.multihal.odin: MIUS: before polling
10-10 21:33:19.068 869 954 I android.hardware.sensors@2.1-service.multihal.odin: MIUS: poll result timeout, continue for next
10-10 21:33:19.068 869 954 I android.hardware.sensors@2.1-service.multihal.odin: MIUS:readEvents() exit
Is there any way to find out what actually calls the sensor?
Thanks in advance!
Tobi Peter
(31 rep)
Oct 10, 2022, 07:46 PM
• Last activity: Oct 10, 2022, 11:10 PM
0
votes
0
answers
196
views
Use infrared LED of the proximity sensor as a remote control
The proximity sensor present in almost all Android phones have a infrared light and a sensor. There exists an app that use this infrared to act as IR remote control? If no, it's possible to construct an app to do that?
The proximity sensor present in almost all Android phones have a infrared light and a sensor. There exists an app that use this infrared to act as IR remote control? If no, it's possible to construct an app to do that?
charles
(189 rep)
Jun 25, 2022, 07:20 PM
• Last activity: Jun 26, 2022, 12:12 PM
2
votes
1
answers
2202
views
Is there a device that will keep me from losing my Android phone?
Recently I lost my phone and have had to order a replacement. It seems that there should be some sort of device I could use that would sound an alarm when I separate more than, say three meters from my phone. Does anyone know of such a device? I tried searching for a proximity sensor but got only ir...
Recently I lost my phone and have had to order a replacement. It seems that there should be some sort of device I could use that would sound an alarm when I separate more than, say three meters from my phone. Does anyone know of such a device?
I tried searching for a proximity sensor but got only irrelevant stuff about the sensor that detects when the phone is being held up to the ear. It seems that "proximity sensor" is the wrong search term.
Scott Severance
(1696 rep)
Aug 12, 2012, 01:14 AM
• Last activity: May 11, 2022, 09:34 PM
4
votes
1
answers
1115
views
How to keep display always off during the call on HTC Sense 4.1 (Android 4.0.1)?
My wife has a problem with HTC Desire X (HTC Sense on Android 4.1) that during the call sometimes (in ~10% cases) the screens goes on for no reason. This cause phone calls to be canceled, loud speaker to be on, etc. I do not know how to reproduce it, but I was on another side of the line already man...
My wife has a problem with HTC Desire X (HTC Sense on Android 4.1) that during the call sometimes (in ~10% cases) the screens goes on for no reason. This cause phone calls to be canceled, loud speaker to be on, etc.
I do not know how to reproduce it, but I was on another side of the line already many times when this problem has happened.
The solution I see is to disable this "automatic on" feature. When the call button is pressed or the phone call is answered, the screen should go off and can be switched on **only** by pressing a hardware button (central or on/off button) and not by the proximity sensor.
I could not find an application that can do this.... Is there any?
If not, is it possible in theory to create such app without replacing the HTC Sense interface?
**ADDED:** Are there maybe some other interfaces around that have such settings? In Samsung or other devices?
Dime
(161 rep)
Apr 25, 2013, 03:11 PM
• Last activity: Feb 3, 2022, 10:02 PM
8
votes
2
answers
20875
views
How to disable proximity sensor
I dropped my Motorola Charm (Android 2.1) and the proximity sensor doesn't work which is annoying, it makes the the touchscreen disabled when I dial anything (super annoying). I would rather like to disable the proximity sensor, so it will never disable the touch screen. Does anybody know how I can...
I dropped my Motorola Charm (Android 2.1) and the proximity sensor doesn't work which is annoying, it makes the the touchscreen disabled when I dial anything (super annoying).
I would rather like to disable the proximity sensor, so it will never disable the touch screen.
Does anybody know how I can do so?
In case of absence of any ready made solutions, I am even willing to write my own app for that (there are programs that do that but for Android 2.2).
Medya
(181 rep)
Dec 4, 2012, 08:56 AM
• Last activity: Jun 10, 2021, 12:17 PM
4
votes
1
answers
5908
views
Disable proximity sensor on Nexus 5
My Nexus 5's proximity sensor is broken and I verified the same using the [Proximity Sensor Test][1]. As usual, the screen goes black during the calls and I use the power button to end the call. But the problem is during whatsapp or skype call, power button doesn't help and I need to search for a Bl...
My Nexus 5's proximity sensor is broken and I verified the same using the Proximity Sensor Test .
As usual, the screen goes black during the calls and I use the power button to end the call. But the problem is during whatsapp or skype call, power button doesn't help and I need to search for a Bluetooth or ear phones to dial or receive a call.
Kindly help me to disable proximity sensor or any other work arounds
Edit: Unfortunately I am not interested in rooting. So I am looking for some kind of app.
Gopi
(261 rep)
Sep 21, 2018, 06:14 AM
• Last activity: Mar 23, 2021, 11:02 PM
0
votes
1
answers
2494
views
How do I turn off screen turnoff during call?
Even though thr light sensor still works as Ive checked, it turns of screen automatically no matter how lighted the area is and i can only reuse the screen once the call is over. I've followed other directions to check call settings, but i couldn’t find any settings to modify that there. Is there an...
Even though thr light sensor still works as Ive checked, it turns of screen automatically no matter how lighted the area is and i can only reuse the screen once the call is over. I've followed other directions to check call settings, but i couldn’t find any settings to modify that there. Is there any other ways to disable this?
To reiterate, I'm running Android 10 on Realme 7i.
dk3ghk
(1 rep)
Mar 6, 2021, 01:55 PM
• Last activity: Mar 6, 2021, 05:17 PM
2
votes
1
answers
634
views
Proximity Sensor is mocked to 5cm, screen still goes dark
After replacing the display of my Xiaomi Mi A2 Lite, my proximity sensor is giving me wrong values (saying, my phone is always covered). I mocked my sensors using the [XPosed Sensor Disable App](https://play.google.com/store/apps/details?id=com.mrchandler.disableprox), and the various sensor test ap...
After replacing the display of my Xiaomi Mi A2 Lite, my proximity sensor is giving me wrong values (saying, my phone is always covered).
I mocked my sensors using the [XPosed Sensor Disable App](https://play.google.com/store/apps/details?id=com.mrchandler.disableprox) , and the various sensor test apps tell me, that the distance is 5cm (the maximum). Still, my phone's screen goes black when playing audios or making a call. Am I missing something? Maybe another sensor's setting?
The way I mocked my Sensors was the following:
LTR579 ALSPS: 5cm, LTR579 ALSPS-Non Wakeup Secondary: 0cm
I'm really out of ideas, it would be great if someone could help me! I'd hate having to open my phone again, and I'll happily do without the screen going black feature. I honestly have no idea why the test says "5cm", but the phone still decides to go dark. >:(
Thanks alot for any ideas!
DLIK
(31 rep)
Jan 8, 2021, 02:01 PM
• Last activity: Jan 8, 2021, 05:18 PM
1
votes
5
answers
36889
views
Screen goes off during call and does not come back in Micromax A89
I am using Micromax A89 with ICS 4.0.4 512 MB RAM Screen 4.0 Inch I am facing this problem since beginning. But it was solved automatically. Now again it happens when I dial a call or receive a call my mobile's screen goes off and does not come back. I must have to use power button to end the call (...
I am using Micromax A89 with
ICS 4.0.4
512 MB RAM
Screen 4.0 Inch
I am facing this problem since beginning. But it was solved automatically. Now again it happens when I dial a call or receive a call my mobile's screen goes off and does not come back. I must have to use power button to end the call (I set "Power button end call" checkbox from settings).
I think it's a proximity sensor problem but not sure?
But when I restart my mobile then it works for 1 or 2 calls but after it again it creates this issue.
Any help would heartily be appreciated.
NullPointer
(249 rep)
Jun 3, 2014, 08:37 AM
• Last activity: Sep 22, 2020, 12:07 AM
4
votes
1
answers
373
views
How to avoid black screen on call?
I have an Xiaomi Mi Max which for some reason stopped the proximity sensor at 0 and this means I get black screen on every call (Whatsapp calls in particular) and I cannot do anything but restart. The phone is rooted and I wish to find a way to use my phone otherwise I have to probably throw it away...
I have an Xiaomi Mi Max which for some reason stopped the proximity sensor at 0 and this means I get black screen on every call (Whatsapp calls in particular) and I cannot do anything but restart. The phone is rooted and I wish to find a way to use my phone otherwise I have to probably throw it away as the sensor itself cannot be found in my country.
Is there any trick or application which can help me disable or otherwise set the proximity sensor to a number that it doesn't bug me?
Shan
(140 rep)
Sep 20, 2020, 07:14 PM
• Last activity: Sep 21, 2020, 07:14 PM
0
votes
0
answers
96
views
Turn on a Quicksettings tile automatically when I open a specific app?
[![enter image description here][1]][1] [1]: https://i.sstatic.net/P6ZV1.jpg I want to turn on proximity service tile when I open an app and turn off proximity service tile automatically, when I close the app.

Piesquareisg
(23 rep)
Aug 6, 2020, 09:26 AM
• Last activity: Aug 6, 2020, 10:25 AM
13
votes
9
answers
106744
views
Whats the use case of proximity sensor?
Can anyone explain to me what is the purpose of the proximity sensor, on my phone. What if my phone's proximity sensor stops working or gets damaged. What problems will I face? *PS: I am just curious to know.*
Can anyone explain to me what is the purpose of the proximity sensor, on my phone. What if my phone's proximity sensor stops working or gets damaged. What problems will I face?
*PS: I am just curious to know.*
Mohit Jain
(275 rep)
Apr 20, 2013, 05:46 PM
• Last activity: Jun 23, 2020, 08:57 AM
1
votes
1
answers
143
views
Strange problem with proximity sensor on Nexus 5X
A few days ago I started experiencing a strange problem with my proximity sensor. When I answer a call and put the phone to my ear, the screen goes blank. When the call ends, the screen stays black. This (as I've discovered) happens to quite a few people. I started checking with aida64 app. When the...
A few days ago I started experiencing a strange problem with my proximity sensor. When I answer a call and put the phone to my ear, the screen goes blank. When the call ends, the screen stays black. This (as I've discovered) happens to quite a few people.
I started checking with aida64 app. When the app starts, it reports proximity sensor value of 5cm. When I cover the sensor, the value goes to 0. Then I uncover the sensor - and the value stays at 0. I switch from aida64 to any other app and back to aida64 - and the value goes back to 5cm. Alternatively, I can
switch the screen off, then on again - and the value will go back to 5cm. Basically, it looks like once the value is down to 0, it won't reset for the currently running activity/app - yet it does reset when the activity is deactivated and then reactivated.
I tried booting in safe mode - same results.
Any ideas about trying to solve this?
The phone is Nexus 5X with PureNexus 7.1.2 ROM and Magisk. Come to think of it, it may have started when I updated magisk a few days ago, but maybe not. Any suggestions on rolling magisk back a couple of versions would also be useful.
*EDIT:* I uninstalled magisk altogether and the problem persists, so it can't be magisk related.
Aleks G
(1343 rep)
Apr 23, 2020, 05:43 PM
• Last activity: Apr 25, 2020, 01:55 PM
2
votes
0
answers
251
views
android keep screen on while on call on Android 8.0.0
I guess I have a problem with the proximity sensor. The screen turns off when I start a call but it's impossible to turn it on again. The only option left is to hard restart the phone. I'm using right know the power button to ends call. Still, it's impossible to manage voice messages (delete or save...
I guess I have a problem with the proximity sensor. The screen turns off when I start a call but it's impossible to turn it on again. The only option left is to hard restart the phone.
I'm using right know the power button to ends call. Still, it's impossible to manage voice messages (delete or save them) or to interact with any other automated call.
I'm not able to find settings for incoming calls as other posts mention and apps such as Screen On do not seem to work.
Any idea of how to keep screen on while on call on Android 8.0.0? Maybe using a particular call app?
Best,
Rafael
Rafael Angarita
(121 rep)
Jan 18, 2020, 09:25 PM
• Last activity: Apr 5, 2020, 11:04 AM
0
votes
0
answers
83
views
Why is the proximity sensor suddenly shining brightly?
Top right is where the "light / proximity sensor" lives, according to the manual. It is clearly visible as white light on this photo - that is expected. What is NOT expected is that it is also clearly visible to the naked eye?! It's a tiny red dot, impossible to photograph as such. That sensor has n...
Top right is where the "light / proximity sensor" lives, according to the manual. It is clearly visible as white light on this photo - that is expected. What is NOT expected is that it is also clearly visible to the naked eye?! It's a tiny red dot, impossible to photograph as such.
That sensor has never been visible before! **Why is it visible now?**



Torben Gundtofte-Bruun
(3285 rep)
Mar 28, 2020, 06:36 PM
Showing page 1 of 20 total questions