So there I was, minding my own business, when Samsung just had to go and say something stupid. I’m talking about the latest Samsung Galaxy S4 commercial, which has the theme “some smartphones are smarter than others”. Yes, they are, and my Galaxy S II is, I dare say, a heck of a lot smarter than any stock Samsung phone, the S4 included. Just as an example, here’s how to replicate the wave-to-answer feature in Tasker, in roughly 2 minutes.

Note: This article has been updated several times, so make sure to read the entire thing before doing anything. There’s now both a downloadable profile and a video tutorial.

As for as Tasker creations go, this one is extremely simple, but then again that just goes to show how pathetic it is for Samsung to brag about putting it in a phone. You only need a single profile, and it looks like this:
Context 1: State->Phone->Call, type: Incoming
Context 2: State->Sensor->Proximity Sensor
Context 3: State->Sensor->Orientation, is Face Up
Task:
Action 1: Phone->Take Call
(Action 2: Task->Wait)
Action 3: Audio->Speakerphone, set: On

Action 2 is optional and can be added and configured if having the Speakerphone action right after Take Call ends up not working.

You also have to go into the profile settings and disable “restore settings”, or it will turn off the speaker phone immediately after turning it on.

This is all you need to set this up, and the result is as follows:

There’s a bug with the phone app so it doesn’t show the speakerphone being on in the video, but you can hear it right when I hang up.

As Pavel points out in the comments, this doesn’t detect hand movement, but rather uses the proximity sensor. This means you need the Face Up context to make sure it doesn’t go off accidentally when in a pocket, face down, or something like that. You can also filter it further by for instance adding location contexts so that this only works at home or in the office.

PS: Last year I replicated two S III features using Tasker: Smart Alerts and auto-syncing MP3 player accessory.

EDIT: For anyone using Tasker for the first time with this setup, here’s a link to download the profile. Visit the link on your device, then hit download, and click it once downloaded. It should prompt you with an option to open in Tasker. Once that’s done, go to Tasker, single click the Profiles tab, hit Import, and select Wave To Reply. Turn on the profile if it’s not on, and exit Tasker to test it out.

EDIT 2: This profile uses the Call state context, which actually refers to a call in progress, not just the phone ringing. This is because the context that detects the ringing is an Event context, meaning it will trigger right when the phone rings, rather than stay active while it’s ringing. Since we need to use the proximity sensor as the actual trigger for this, we can’t use that Event context, so we have to use the Call context. Because of this, the profile will re-trigger if anything is detected by the proximity sensor while the call is active. This shouldn’t be an issue for most people, but if it is, there are several ways of fixing it. Here’s one example that I’ve tested to work:

Create a new profile, choose the Event category, and pick Phone Idle as the context. That means the task attached to it will run once when you hang up. Add a task, go to the Tasker category of actions, and pick Profile Status. Find the wave-to-answer profile in the list (you need to have given the profile a name first, which you do by long pressing on the title and giving it a name), and set it to turn it on. Next, go into the task for the wave-to-answer profile. At the very bottom, add a new action, find the Profile Status action again, specify the same profile name, but now set it to turn it off.

What this does is that the wave-to-answer task now disables its own profile when it’s done doing everything else. The profile is however re-enabled the moment you hang up your call, meaning it’s ready for next time.

EDIT 3: Video tutorial

The below video is a complete video tutorial showing how to add this from scratch in Tasker. I tested the finished profile I created in this video afterwards, and it works perfectly on my phone/ROM. It answers the phone, turns on speakerphone, and the mic works, every time.

If you follow this exactly and you end up with a different result, then unfortunately there’s nothing I can do. The unfortunate truth is that devices and ROMs do things slightly differently, and there’s never a guarantee that something that works on one device will work on another. The only remedy is to head over to our beginner’s guide and learn Tasker from scratch, pinpoint exactly what fails, and come up with something that works on your specific device.

EDIT 4: 

It seems that Take Call doesn’t work with a lot of ROMs out there, due to something Google changed for the sake of being di…for the sake of “security”. The Tasker plug-in Secure Settings does however allow you to do it with root, by using the Phone Options action found in the Secure Settings configuration screen when selecting that action in the plug-in category.