building new application starting with alarm clock source code


Last Updated:

  1. iduke

    iduke Member This Topic's Starter

    Joined:
    Jan 4, 2010
    Messages:
    5
    Likes Received:
    0
    I'm hoping to create a custom alarm clock, and I'd like to start with the code for the alarm clock that is already part of the android platform. I downloaded the code from android.git.kernel.org Git - platform/packages/apps/AlarmClock.git/summary and created a new android project in eclipse using this source code, but I'm getting some compile errors. Can anyone help me figure out why or let me know if there is a better way to build a new alarm clock application starting with the android source code?
    Thanks in advance.
     

    Advertisement
  2. eclipsed4utoo

    eclipsed4utoo Well-Known Member

    Joined:
    Nov 12, 2009
    Messages:
    435
    Likes Received:
    27
    What are some of the compile errors?
     
  3. iduke

    iduke Member This Topic's Starter

    Joined:
    Jan 4, 2010
    Messages:
    5
    Likes Received:
    0
    I'm guessing I'm not using the correct version of the source code with the correct version of the SDK, but I've tried lots of different combinations and can't get any of them to work.

    Some of the errors I'm getting when trying to use the latest snapshot with the 2.0.1 SDK:
    In Alarms.java, Intent.ACTION_ALARM_CHANGED cannot be resolved on line 438.
    In AlarmKlaxon.java, line 89 "mVibrator = new Vibrator();" throws an error because the Vibrator constructor is not visible, and on line 207, com.android.internal.R.raw.fallbackring cannot be resolved.
    In SetAlarm.java, com.android.internal.R.id.content cannot be resolved on line 113.

    How can I figure out which SDK version to use with which snapshot of the code?
     
  4. eclipsed4utoo

    eclipsed4utoo Well-Known Member

    Joined:
    Nov 12, 2009
    Messages:
    435
    Likes Received:
    27
    what are you trying to accomplish? You don't really need to use the source code for the OS. You simply use the SDK since the OS is also using the SDK(along with some hidden methods that the SDK doesn't use).
     
  5. draffodx

    draffodx Member

    Joined:
    Oct 6, 2009
    Messages:
    8
    Likes Received:
    0
    As above, you dont need to use the source code to make your own alarm clock, just get the SDK and build a new Android project in eclipse
     
  6. iduke

    iduke Member This Topic's Starter

    Joined:
    Jan 4, 2010
    Messages:
    5
    Likes Received:
    0
    I'm trying to make an alarm clock with different snooze and dismiss behaviors. I was hoping not to have to rewrite code for setting alarms and alarm preferences. How would I do this without using the source code?
     
  7. eclipsed4utoo

    eclipsed4utoo Well-Known Member

    Joined:
    Nov 12, 2009
    Messages:
    435
    Likes Received:
    27
    you don't have to download it and build it. You can simply copy and paste the code. Though you may need to go to a number of different .java files to get what is needed.
     
  8. kosiakk

    kosiakk Member

    Joined:
    Jan 27, 2010
    Messages:
    9
    Likes Received:
    2
    Really, it's not a good idea.

    Android 2.1 have significantly different Alarm Clock application, and it's source code is not yet published.

    Original (1.6) source code was so bad, so I had to rewrite almost everything of it for my Smart Alarm Clock.

    Current source code (with background service) is much better, but still is too messy from my point of view.

    Read it, learn it, make your own with new ideas.
    But there are a lot of apps in the market already that do whatever you need. Please, create something new, not just another crappy math-alarm-clock torture.
     
  9. kosiakk

    kosiakk Member

    Joined:
    Jan 27, 2010
    Messages:
    9
    Likes Received:
    2
    That's a good idea.
    My alarm application has several extention points. Just create broadcast-receiver for some specific intents to catch all the events.

    You can also use native alarm database to use original interface for configuration:
    android-alarm-database - Project Hosting on Google Code (sorry for another self-advertisement)

    I hope it will be really easy to create plugins for android alarm clock.
     
  10. wiab21

    wiab21 New Member

    Joined:
    Mar 3, 2011
    Messages:
    1
    Likes Received:
    0
    I'm brand new to building Apps, and don't knwo if it would be easier to add to an existing program, or start from scratch.

    I'm looking to add a "sunrise" simulation to an alarm clock. Not just the picture of a sunrise, but the screen waking up, for an adjustable length of time before the alarm goes off, gradually get brighter until the alarm time. Any thought of how to add this to a program?
     
  11. naveen03

    naveen03 Member

    Joined:
    Feb 25, 2011
    Messages:
    12
    Likes Received:
    0
  12. naveen03

    naveen03 Member

    Joined:
    Feb 25, 2011
    Messages:
    12
    Likes Received:
    0

Share This Page

Loading...