title: Fire different methods depending upon duration of button click in android
body: <p>I am relatively new to android. I was thinking of adding a functionality in which two different types of event occur depending upon the duration for which the button is pressed. Is such a functionality possible?
  Say if the user presses the button for three seconds it should open a settings menu and otherwise it should search music in you phone. I am not concerned about what to do. I need to know if such a thing where I can detect the duration is possible</p>