I am writing my alarm clock. He put the controls on, but I don’t imagine how the main mechanism works - how to play a melody or cause a vibration when a certain time comes? What is the name of this event?

  • I think that if you were only enough to put control over it, then you shouldn’t go anywhere without a theory. Read some clever books, unfortunately there are no such books in Russian, but there is a resource called habrahabr. There are many useful things - LackOfKnowledge
  • Goloshchapov A. L. - Google Android Programming for Mobile Devices - 2011 - ReinRaus
  • In general, books on android in Russian are already more than enough! I personally have 4. Ozone will help. I advise the book Reto Meier Android 2. Application development and Android for 24 hours, although the latter is specific. - DroidAlex

1 answer 1

Link to ready alarm: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/index.html#Alarm to play mp3:

mediaPlayer = MediaPlayer.create(context, R.raw./*your ringtone here*/); mediaPlayer.start(); 
  • excellent thank you! - tfiwsrets