Activate proximity sensor during call in my app - Samsung Galaxy S10 Questions & Answers

I'm developing app for WiFi calling.
I want to turn off screen when proximity sensor reports "near". It work fine on other phones but on S10 phone looks like proximity sensor is not even activated - there is no white dot blinking on top part of the screen.
If I make normal call or use WhatsApp dot starts blinking as soon as I start the call.
So what do I have to do in my app to make that white dot blink on Samsung S10 phone?

I'm not quite sure, but there seems some kind of known issue with the proximity sensor that dates back to at least March. Screen coming on while in your pocket, screen not lighting up when pulled back from your face during a call, screen randomly coming on while on a call, despite it being pressed against your ear/face. I've tried everything suggested and the issues remains, unfortunately I'll be returning my S10+ and going back to my S8+, pretty disappointing for a $1,000 phone.

It's always recommended to do a factory reset after an update, problems happen not only on Samsung, even on iPhones, not a big deal.
Try this?
https://forum.xda-developers.com/showthread.php?t=2568003

TheNurd said:
I'm not quite sure, but there seems some kind of known issue with the proximity sensor that dates back to at least March. Screen coming on while in your pocket, screen not lighting up when pulled back from your face during a call, screen randomly coming on while on a call, despite it being pressed against your ear/face. I've tried everything suggested and the issues remains, unfortunately I'll be returning my S10+ and going back to my S8+, pretty disappointing for a $1,000 phone.
Click to expand...
Click to collapse
During normal phone call my sensor works as it should.
I just don't know how to activate it in app that I'm developing.
On all other types of phones this is not a problem, since this sensor is always on. It is just S10 series that have some kind of special sensor which have to be activated. You can see white dot (left form the front camera) blinking during call... that means that the sensor is activated.
The only other app I saw apart from phone app that can activate this sensor is WhatsApp. It activates it during call or during listening to voice messages.
I also checked Google Duo, Messenger Lite and Linphone app and none of these doesn't activate sensor. So it must be something that WhatsApp knows and others don't.
I also asked this on WhatsApp support, but I was ignored of course.

Do you find how to activate it? I have the same problem in my app and it looks similar on new Samsungs (I find it out on Galaxy Note 10)
Thanks for replay.

Related

Strange Proximity Sensor Behavior

There seem to be several proximity sensor threads but I've done a search and have not found anyone that is having this same problem.
When I make a phone call, my screen turns off right away. I can only get it to come on by pressing the power button or tilting the phone so that a bright light or glare is on the proximity sensor or light sensor. This is a pain. I use my power button to end calls but I have to disable that option. Otherwise, any time I need to use touch tones for an in-call menu, I hang up or spend a minute tilting my phone or holding it up to a light bulb. I know there are workarounds that I could be using but I am wondering if my proximity sensor or light sensor is malfunctioning or if it is a software issue.
Also, when using the visual voice mail app, my screen goes black but not off. I can still see the status bar. It happens as soon as I tap the play button and works just fine after my voice mail stops. This is likely unrelated but I can't be sure.
Thanks in advance to anyone that helps!
Running stock and unrooted with no physical damage or obstruction of sensors. I have tried a factory reset... twice.
I'm having a weird issue with mine as well. Mine is a little different though. If I need to make a call that requires to enter # prompts and as soon as I move the phone away from my face the keypad will start beeping on the other end so the prompts will always get invalid responses. While on the phone and I move the phone away from my face for any reason, the person on the other end will hear the beeping.
mokash34 said:
There seem to be several proximity sensor threads but I've done a search and have not found anyone that is having this same problem.
When I make a phone call, my screen turns off right away. I can only get it to come on by pressing the power button or tilting the phone so that a bright light or glare is on the proximity sensor or light sensor. This is a pain. I use my power button to end calls but I have to disable that option. Otherwise, any time I need to use touch tones for an in-call menu, I hang up or spend a minute tilting my phone or holding it up to a light bulb. I know there are workarounds that I could be using but I am wondering if my proximity sensor or light sensor is malfunctioning or if it is a software issue.
Also, when using the visual voice mail app, my screen goes black but not off. I can still see the status bar. It happens as soon as I tap the play button and works just fine after my voice mail stops. This is likely unrelated but I can't be sure.
Thanks in advance to anyone that helps!
Running stock and unrooted with no physical damage or obstruction of sensors. I have tried a factory reset... twice.
Click to expand...
Click to collapse
It sounds like your issue is hardware related. Take it to a sprint repair store and have it exchanged.
mrwicked said:
I'm having a weird issue with mine as well. Mine is a little different though. If I need to make a call that requires to enter # prompts and as soon as I move the phone away from my face the keypad will start beeping on the other end so the prompts will always get invalid responses. While on the phone and I move the phone away from my face for any reason, the person on the other end will hear the beeping.
Click to expand...
Click to collapse
You issue also sounds hardware related. The touchscreen sounds like it is going out. It might be the dialer app but I doubt it. Speaking from experience of course.
I went to Sprint store yesterday and they gave me a replacement for mine.
insuusvenerati said:
It sounds like your issue is hardware related. Take it to a sprint repair store and have it exchanged.
You issue also sounds hardware related. The touchscreen sounds like it is going out. It might be the dialer app but I doubt it. Speaking from experience of course.
Click to expand...
Click to collapse
Thanks I will head to a store and follow up here for anyone else. Thanks again.
I would check the sensor settings and play around before trying the store. But if that doesnt work it prob is hardware issues

[Q] Screen stays off during call no matter what I do!

When I am in a call, putting the phone to my face turns the screen off using the proximity sensor. However, removing the phone from my face does not turn the screen back on. Nothing turns it back on even if I push all the buttons or hold them or do anything unless the other person hangs up. I cannot remember when it started....before or after the recent update.....but it did start very recently. Any ideas? If I turn off the proximity sensor during calls it works fine by locking and unlocking the screen with the buttons.
MNDZA said:
When I am in a call, putting the phone to my face turns the screen off using the proximity sensor. However, removing the phone from my face does not turn the screen back on. Nothing turns it back on even if I push all the buttons or hold them or do anything unless the other person hangs up. I cannot remember when it started....before or after the recent update.....but it did start very recently. Any ideas? If I turn off the proximity sensor during calls it works fine by locking and unlocking the screen with the buttons.
Click to expand...
Click to collapse
Is anything covering the front facing camera, or light sensor? Like a case, bad screen protector, etc....
Does your front facing camera work just fine as a camera?
How about air gestures? Do they work?
I'm asking these things because it seems your proximity sensors aren't working properly. Your phone thinks it's next to your head all the time, so it's not waking the screen until the other person ends call. We need to find out which one is acting up and why.
The front camera works, but in my office it seems VERY sensitive to light. The lights are glaring heavily. I never use the front camera so I don't know if that's normally how it was. Air gestures work when the screen is on (swiping left and right to view my photos), but the quick glance won't work when the phone is locked. The weird thing is that quick glance works when I do the "try it" tutorial only.
440bro said:
Is anything covering the front facing camera, or light sensor? Like a case, bad screen protector, etc....
Does your front facing camera work just fine as a camera?
How about air gestures? Do they work?
I'm asking these things because it seems your proximity sensors aren't working properly. Your phone thinks it's next to your head all the time, so it's not waking the screen until the other person ends call. We need to find out which one is acting up and why.
Click to expand...
Click to collapse
Ok now it seems quick glance DOES work when the phone is off....I just couldn't do it correctly.
Main problem still exists though.
What rom are you using
Sent from my SAMSUNG-SM-N900A using Tapatalk
My note 2 started like this also. I don't know what's wrong with it.
Sent from iNew V3 using Tapatalk
My phone is completely stock and not rooted.
MNDZA said:
My phone is completely stock and not rooted.
Click to expand...
Click to collapse
then i would contact att and get a warrenty replacement
jerrycoffman45 said:
then i would contact att and get a warrenty replacement
Click to expand...
Click to collapse
I was thinking that, but I'm tempted on resetting my phone and seeing if that helps. The problem is that I would lose all my app data and I'd hate to deal with that.
MNDZA said:
I was thinking that, but I'm tempted on resetting my phone and seeing if that helps. The problem is that I would lose all my app data and I'd hate to deal with that.
Click to expand...
Click to collapse
att will ask you to do that when you call
MNDZA said:
When I am in a call, putting the phone to my face turns the screen off using the proximity sensor. However, removing the phone from my face does not turn the screen back on. Nothing turns it back on even if I push all the buttons or hold them or do anything unless the other person hangs up. I cannot remember when it started....before or after the recent update.....but it did start very recently. Any ideas? If I turn off the proximity sensor during calls it works fine by locking and unlocking the screen with the buttons.
Click to expand...
Click to collapse
Unfortunately this sounds like a bad proximity sensor. This can be verified by testing the sensor by dialing *#0*#
I had this happen to my last Note 3. The only difference was I could turn the screen back on with the home button.
done12many2 said:
Unfortunately this sounds like a bad proximity sensor. This can be verified by testing the sensor by dialing *#0*#
I had this happen to my last Note 3. The only difference was I could turn the screen back on with the home button.
Click to expand...
Click to collapse
I tried that *#0*# test and I can activate the proximity sensor, but it seems to stay on after that.
This is a known issue with our phone. I had this issue myself. Plenty of times. Just call ATT and ask for a replacement.
Yeah I just found this:
http://forums.androidcentral.com/sa...-3-proximity-sensor-issue-during-calls-5.html
It's not a software issue use canned air and blow by the speaker and the headphone jack als o press on the back of the phone . This has happened to me
Sent from my SAMSUNG-SM-N900A using xda app-developers app
i stumbled upon this thread and took my phone apart and sure enough there was lint in it. in the dial pad using the *#0*# method, when i covered the sensor the screen would light green, vibrate, and stay that way after i moved my hand away. i cleaned it and everything is perfect!!!
Try this
https://www.youtube.com/watch?v=fls4NIRJ1IQ&feature=youtube_gdata_player
Sent from my Note 3 SM-N900A rooted by Designgears

Black screen after call - growing tired of this phone

Does anyone else have this issue? It's really driving me crazy to the point where I feel like ditching the Nexus 6. It's not even every call, but it is enough to annoy me. Pull the phone away from my head and the screen wont wake up. All I can do is long hold power to force a reset. It's really annoying. I've tried the proximity fix for 5.1 but it still happens. I can't set "power to end call" because also sometimes the phone doesn't wake the screen when there is an incoming call so I have to press power to wake the screen to see who it is.
Does anyone have any idea how to get around this other than the two solutions above? This has happened on both my devices (Original and RMA) and I just can't take it any more.
I sounds like a faulty proximity sensor. And I've observed intermittent behavior like this on previous phones (but not my N6). You can test this with a number of apps. I've used "Sensor Box for Android", but there are several more. Prox sensor is located near the top LH corner. With the app open and on prox sensor, passing your hand over it should register on the app.
You are so active on this forum that I won't even ask about a screen protector....
The proximity sensor seems to work fine under all tests that I have done. I actually use Tasker to utilise the proximity sensor to set ringer volume based on whether it is activated or not (eg in my pocket, proximity sensor CLOSE, set ringer high).
Its not every call either and multiple Nexus 6 devices have had this issue for me too. Proximity sensor works in every test
That's weird. I've had no issues at all. I assume you have the issue on the stock ROM too.....
I suppose I'll have to test though I don't really want to run stock.
What about disabling Tasker and trying it out.
Happens with or without tasker. It's pretty much always done it since 5.1
There are known issues with the prox being flaky on this device. I just need to find a way to overcome this.
Remember, we need to separate problem solving from the idea of how we want our phone to look and perform. Once you've identified the root cause, you can then decide what steps you want to take to solve it.
*Sigh* Yes I know. But it's so intermittent I won't know if it solves it for a looooong time. It would be quicker to return to stock, sell it and buy something else
I've literally never ran stock on the nexus 6.
Like Camera indicated, I'd try removing the screen protector if you have one and see if it's better.
It's not a protector issue.
Let's assume I've done all the obvious things except flash stock
Edit. I'm going to try and use power button ends call. Just to see of its an active call that causes it.
Hopefully it will happen when I can take a log cat but inise the phone very rarely.
Try this app in the Playstore.
https://play.google.com/store/apps/details?id=com.vorlan.screenoncall.free
I had a similar issue where the screen would time out while I was on a call and wouldn't wake when I moved the phone away from my face. I had to hit power button to wake phone and enter pin just to end a call. I make/recieve over 100 calls per day and it was getting old til I found this app. Works perfectly every time.
Thanks but that's not the same issue. Mine will not wake at all. I have to force a reboot to get display
You might give the app a try just to see. It keeps the screen on during a call but the proximity sensor still shuts the screen off unless you are on speaker phone. It may not work, but worth a try to keep your N6!
I've seen the same thing with my N6, display goes black (randomly, not even related to a call) and the only thing I can do is reboot. Haven't wasted any time looking for a solution, 'cause I don't think there is an easy one and there is no way to know if something you try is even going to work! I just reboot and move on.
Just posting to let you know you are not crazy and there is someone else out there with the same problem!!!
I'm not sure what you mean. I've been recommended this app before but I don't like the idea of mybscreen being on.
What do you mean it keeps the screen on but proximity still shuts it off? .
Thanks for confirming
Basically it doesn't let the screen timeout. Proximity sensor still functions like normal.
I would try it and see.
If it helps good, if not no harm. It definitely fixed my issue, even if my issue wasn't exactly what you're experiencing.
Well power button end call didn't help. I don't think it is a proximity sensor issue. Let's hope it happens when I can get a logcat. Unlikely. Maybe a job for tasker.
I had this issue too. I eventually thought it was tied to UV, but then I installed all stock and didnt change anything and it still happened. Maybe a bug in lollipop.

Edge Lighting and AOD questions/issues

I have the regular S10 and noticed that the proximity sensor doesn't seem to be working for AOD. Based on some quick searching around a few sites that appears to be a global issue. So as of now if I cover the front sensor or put my phone face down AOD continues to stay on screen. I assume that should turn the screen off though?
The other issue I found is with the Edge Lighting. I have it set to Always show. But it won't show the Lighting when my screen is off. I doesn't matter if I have AOD on or off. I can hear notification sounds but my screen will just stay off.
Is anyone else having these issues? Any thoughts or suggestions?
Both issues are known, but Samsung still didn't respond to them.
The proximity issue is a really annoying bug apparently, I often find it very hard to listen to WhatsApp Voice notes since the Screen just won't turn off the first 3-4 seconds. It's the same with regular phone calls, my screen only goes off after pressing the S10 really hard against my ear.
And no, I don't get edge lighting as well when my screen is off even I turned everything on. I hope samsung will fix these issues asap.
Thanks for the reply and info. I really hope Samsung fixes these issues soon. They are pretty big bugs in my opinion.
Same issues here and it also results in insane battery drain since the display turns on in pocket.
I figured it would be best to report it so they feel the heat so i called Samsung support here in Sweden today, the guy i spoke to thought it might be software error and if that's the case a fix will be released soon enough.

Proximity Sensor Issue

I am having an issue where always on display is staying ON while in pocket/faced down on the table. Feels like the proximity sensor is not working while on the AOD.
Plus, the proximity sensor doesn't seem to work while in the pocket either. The setting 'prevent accidental touches' has been enabled, however it is still responding to 'double tap to wake' while in the pocket for whatever reason...
Is there any fix to this?
I noticed the AOD stays on in my pocket as well. I thought maybe it was by design that way, even though it makes no sense.
Have not had a single pocket wakeup though.
It does seem that the proximity sensor (which is really the camera) doesn't work especially well though, from reports of people noticing it on phone calls. Hopefully something that can be fixed in software.
jdock said:
I noticed the AOD stays on in my pocket as well. I thought maybe it was by design that way, even though it makes no sense.
Have not had a single pocket wakeup though.
It does seem that the proximity sensor (which is really the camera) doesn't work especially well though, from reports of people noticing it on phone calls. Hopefully something that can be fixed in software.
Click to expand...
Click to collapse
Thanks mate, appreciate your feedback. Proximity sensor works fine on my phone during calls. Can't think of any reason why Samsung would intend it this way...
Proximity sensor issue here as well
I have the same problem. I put phone into test mode and it was bad compared to my wife's s9 search proximity sensor s20fe on YouTube and see others with issue
There is no fix. This is apparently the way AOD works now. I can't remember if it started with the S10s or S20s.
uggies said:
I am having an issue where always on display is staying ON while in pocket/faced down on the table. Feels like the proximity sensor is not working while on the AOD.
Plus, the proximity sensor doesn't seem to work while in the pocket either. The setting 'prevent accidental touches' has been enabled, however it is still responding to 'double tap to wake' while in the pocket for whatever reason...
Is there any fix to this?
Click to expand...
Click to collapse
I did some research on s20fe proximity sensor, because I desperately wanted flip case to open and close the screen.
Here is what I have noticed: there are two "proximity sensors" both sides of the front camera. These sensors close the screen during call if you touch them (I'm not sure if it's enough to touch just 1 or do you have to touch both of them). You need to touch these with your cheek or finger cause they need a electric field.
Phone also utilizes front camera light sensor during call: if there is no light, it turns off the screen but for this to happen phone needs to be on up right position. Screen won't close if the phone is on desk and you cover the camera.
So anyways, my point is that the proximity sensor is not able to detect if your phone is in the pocket or not. Only way for the phone to detect this is with the front camera light sensor, and I guess this would increase the battery consumption so much, there is no point.
You can test your "proximity sensors" by typing *#0*# in dialer numpad, select sensors and touch from the side of the front camera. If the screen turns green sensors are working.
No problems with Verizon S20 FE 5G UW
Huberttus said:
I did some research on s20fe proximity sensor, because I desperately wanted flip case to open and close the screen.
Here is what I have noticed: there are two "proximity sensors" both sides of the front camera. These sensors close the screen during call if you touch them (I'm not sure if it's enough to touch just 1 or do you have to touch both of them). You need to touch these with your cheek or finger cause they need a electric field.
Phone also utilizes front camera light sensor during call: if there is no light, it turns off the screen but for this to happen phone needs to be on up right position. Screen won't close if the phone is on desk and you cover the camera.
So anyways, my point is that the proximity sensor is not able to detect if your phone is in the pocket or not. Only way for the phone to detect this is with the front camera light sensor, and I guess this would increase the battery consumption so much, there is no point.
You can test your "proximity sensors" by typing *#0*# in dialer numpad, select sensors and touch from the side of the front camera. If the screen turns green sensors are working.
Click to expand...
Click to collapse
I just purchased the Samsung S20 FE 5G UW (how about we shorten this to FE UW?) with all updates AND a glass screen protector and have no touch/proximity issues.
FYI I bought it at the Costco kiosk for a few dollars less per month, no activation charges and a 90 day return policy.
the Galaxy S20 FE (5G) has no physiscal proximity sensor.
Insted it uses a combination of the front camera, touch screen and gyroscope.
I have tested the proximity issues, luckily for me there were ok...turn green. The only thing that drive me crazy is the touch screen issues which never been fixed even after updates. Oh well at least its better than before.
Huberttus said:
I did some research on s20fe proximity sensor, because I desperately wanted flip case to open and close the screen.
Here is what I have noticed: there are two "proximity sensors" both sides of the front camera. These sensors close the screen during call if you touch them (I'm not sure if it's enough to touch just 1 or do you have to touch both of them). You need to touch these with your cheek or finger cause they need a electric field.
Phone also utilizes front camera light sensor during call: if there is no light, it turns off the screen but for this to happen phone needs to be on up right position. Screen won't close if the phone is on desk and you cover the camera.
So anyways, my point is that the proximity sensor is not able to detect if your phone is in the pocket or not. Only way for the phone to detect this is with the front camera light sensor, and I guess this would increase the battery consumption so much, there is no point.
You can test your "proximity sensors" by typing *#0*# in dialer numpad, select sensors and touch from the side of the front camera. If the screen turns green sensors are working.
Click to expand...
Click to collapse
Mate great information here, really appreciate this.
Tested the Proximity sensor using *#0*#, I agree with your analysis. The proximity must be using electric reaction to detect if my ears are touching it or not. Covering it with a book does not trigger a proximity sensor... This explain why my screen keeps waking up in the pocket.
As much as this is annoying, there appears to be no way out Just have to let the phone face outside rather than my legs.
I also have the same issue, while on a phone call, the phone's screen goes on and off constantly and I can see the notification bar moving. Very annoying.
This is a terrible design by Samsung. The punch hole usually goes in the "Empty" part of the ear, so the screen stays mostly on.
I might just return the phone because of this issue, I don't see it getting fixed by a software update.
I have the exact opposite issue with the proximity sensor on my Samsung S20 plus running Android 10 - i.e. it works well by turning the screen off when my ear/cheek/face is very close to the proximity sensor during phone calls; whereas, when the phone's screen is locked and turned off, the proximity sensor is turned off as well. Control by hardware? Software/firmware? Don't know?! To turn the screen on without using the Power hardware button, I had to enable the "Double Tap" feature in Settings.
On earlier/other Android mobile devices - Samsung included - the proximity sensor is always on - whether the screen is on, off, or currently locked. When it's always on, you can be innovative and build a widget, for instance, to turn the screen on by "waving" your hand above the proximity sensor to interrupt the laser. I suspect new(er) Samsung mobile devices like S20 and Note20 variants might be using a "virtual" proximity sensor setup/combo for controlling the device's screen - and that really sucks!
To test if the proximity sensor is always activated on Samsung S20 and Note20 variants, I type *#77692# - which displayed a hardware screen to test proximity and light sensors. Note: if you type *#0*#, the proximity and light sensor options are absent from the hardware test screen.
Has anyone found any method - via codes even - to permanently turn on the proximity sensor, even when the screen is locked and turned off?
I searched through AOSP framework vanilla codes and couldn't see anything out of the ordinary regarding control of the proximity sensor. Samsung might be doing something dubious with their firmwares/hardwares though - well, at least, the S20 and Note20 variants are having issues with the proximity sensor setup.
P.S: Not sure if you guys are aware, but Samsung mobile devices with odd designation tends to be more problematic than their even-designated counterparts, like screen's burn-ins/shadows on Samsung S3 devices, light sensor fluctuation (which affects screen brightness control) on Samsung S5s, and now proximity problems with the S20s and Note20. Samsung S20 variants are in fact "S11" variants renamed. So the trend continues with Samsung always stuffing up their odd-designated device releases.

Categories

Resources