Share your experience!
hi.
I'm using Sony Xperia Z3 dualrunning Lollipop 5.1.1. My proximity sensor is really faulty (Works only when I press hard on the top left corner of the phone). I'm sure it's the proximity sensor because I used test apps and I can see it's detecting proximity all the time (unless I press hard on the corner)
try to run Xperia Diagnostics. settings>about phone
or boot to safe mode to see if it is workng properly
@farhaddarvish, I'm sorry to hear about your phone. 
I'm afraid it sounds more like a hardware fault than a software fault since you have to apply pressure to the top left corner of your phone to get the sensor to work. There is however a few things you can try before sending the device in to a authorized service centre.
Have you tried what @nolramlb suggested?
If there was no change when you tried your phone in safe mode and the proximity sensor wasn't working in the diagnostics test I'd recommend that you try and perform a software repair using Xperia Companion.
If the proximity sensor isn't working without you having to apply pressure to the corner of the phone after the software repair has been completed I'd recommend getting in touch with your Local support and they will be able to assist you with getting your phone sent in.
Let us know how it went! 
The problem is still inventory.
I tested out the Diagnostics but this sensor is On always.
this is work corectly Works only when I press hard on the top left corner of the phone
Thank you so much for when taking.
have a nice time
Thanks for getting back to me!
When the proximity sensor is working correctly it should not always be on, it should only be on when you cover the sensor with for example a finger or your ear.
I'm afraid there isn't much else to try in this case since it sounds like a hardware related rather than software. I'd recommend getting in contact with your Local support and they will be able to assist you further.
Feel free to get back to me if you have any other questions and I will do my best to assist you! 