The invention discloses a method for controlling a
mobile phone music player. The method includes the steps of enabling a user to set the corresponding relation between the moving directions of a
mobile phone and control motions, when music is played in the background, automatically starting an acceleration sensor of the
mobile phone, enabling the user to shake the mobile phone, enabling the acceleration sensor to detect the mobile phone shaking directions by the user, and carrying out control over the mobile phone
music player according to the detected directions and the corresponding relation set by the user. The method for controlling the mobile phone
music player can perceive the different mobile phone shaking directions by the user through the acceleration sensor so as to carry out the corresponding song switching operations or the corresponding volume adjustment operations, and the control of the user over the music player is greatly facilitated. In addition, due to the fact that the corresponding relation between the moving directions and the control motions can be preset by the user, user experience is strengthened.