Recently, some Sony Xperia Z1 owners have reported that they are troubling with an annoying problem on their handset. Whenever they make calls from their phone, the loudspeaker is activated automatically. Loudspeaker activating problem during calls on Sony Xperia Z1 is really annoying when you are in outside and need to call someone.
Solutions for loudspeaker activating problem during calls on Sony Xperia Z1

Loudspeaker Activating Problem During Calls On Sony Xperia Z1
The loudspeaker activating problem during calls on Sony Xperia Z1 is most probably occurring because of any third party app. To check it, the first troubleshooting step should be booting your Xperia Z1 into Safe mode. To do that:
1Press the Power key on your phone and hold it.
2Touch the Power Off option and keep on holding.
3You will see Safe Mode on the screen, tap on it.
4Now your Sony Xperia Z1 will boot into Safe mode.
5Make a call to your Xperia Z1 from any other mobile for a test. Receive the call and see if the call goes to the loudspeaker directly.
6If everything is ok here, then surely a third-party app is causing this loudspeaker activating problem during calls on Sony Xperia Z1. So trace the recently installed apps and delete them one after another until the problem is solved.
But if you see that call goes to the loudspeaker even if in Safe mode, then maybe any core application is the main culprit. So the next thing to do is wiping cache partition:
1Press and hold the Volume Up and Power buttons and do not release the keys until the screen goes off and the phone vibrates.
2Leave the keys after the screen turns off.
3Turn on your phone by pressing the Power button. The cache partition is already wiped out.
Call to your number from another phone now and see if the problem is solved. If not, then you need to have undergone your phone, Sony’s update service process, to do that:
1Go to here from your computer.
2Download the software and install.
3Follow on-screen instruction and then test if the problem persists.
If still the loudspeaker activating problem during calls on Sony Xperia Z1 occurs, then the last step is conducting Factory reset:
1First backup everything of your Sony Xperia Z1.
2Go to Home screen and touch the Application icon.
3Select Settings and tap Personal.
4Click on Backup & Reset option.
5You will see Automatic Reset option there. Uncheck it.
6Under Personal Data, click on Factory Data Reset.
7Tap Reset phone.
8Click on Erase everything to confirm.
Now the problem should be solved. But if not, visit your nearest Sony Service Center.