-2

I am programming alarm clock for myself and i got that problem. I also want to use the solution of my problem to set specified(by me) loud of alarm and ringtone. Please, show the code, if possible?

Muu
  • 23
  • 1
  • 6
  • Please show us what you have tried and specify your exact problem alongside your desired output. – Scott Aug 07 '15 at 15:26
  • I tried to set alarm for each day and play it every one week, but I don't think, that I can use this solution for ringtones and loud of alarm. *each day - selected by user days – Muu Aug 07 '15 at 15:28

1 Answers1

0

A staple of programming is breaking down a requirement to it's very basic components. Imagine the alarm clock app you want to build as a big cube, made out of many smaller cubes. You need to break each one of them down into their atomic elements. Once you've done that, you'll have your answer.

For example, in your case, I would consider some of the following problems:

  • Running a background process, which would still be activated, after a user has minimized the app.
  • Playing a sound.
  • Taking priority of any other app, disregarding of the state of the phone(locked/unlocked) and displaying the 'Wake up' window.
  • Getting the date
  • Getting the time

I would then start searching SO/Google for answers to my specific questions. The Android website and academy is also an incredible resource for all things Android.

I hope this will be helpful to you.

Sipty
  • 1,159
  • 1
  • 10
  • 18