The Hands up mode can only be used if your device has a built-in sensor. When you lift your device to answer the call, this sensor detects the proximity or closeness between your device to your ear and it activates the Hands up feature.
Read the technical documentation of your device for the availability and/or location of the said sensor.