To provide an electronic apparatus, a method of detecting a tap operation, etc. for performing appropriate detection processing of a tap operation. The electronic apparatus includes a setting unit 110 that sets a sampling frequency for acceleration detection of an acceleration sensor 10, a processing unit 120 that performs a determination of a tap operation based on sensor information from the acceleration sensor 10, an operation information acquisition unit 130 that acquires operation information from an operation unit 140, and a communication unit 150 that performs communication processing of information, wherein, when reception of the information by the communication unit 150 is detected or when acquisition of the operation information by the operation information acquisition unit 130 is detected, the setting unit 110 sets the sampling frequency to F2 as a higher frequency than the sampling frequency F1 before detection.