Abstract:
An electronic device for offering an optimized and differentiated haptic feedback to a user on the basis of various states of an electronic device is provided. The electronic device includes a haptic module configured to provide a haptic feedback, a processor electrically connected to the haptic module, and a memory electrically connected to the processor. The memory stores instructions, that when executed by the processor, cause the processor to control to detect a signal of a request for the haptic feedback, to identify a contact part of the electronic device by using a sensor module, and to provide the haptic feedback based on results of identifying the contact part.