Football Fans: Download the 2012 Schedule App from Google Play!


Go Back   Android Forums > Android Development > Application Development

Application Development Dev Lounge for the Coder Folks



Reply
 
LinkBack Thread Tools
Old January 4th, 2010, 10:23 PM   #1 (permalink)
New Member
 
Join Date: Jan 2010
Posts: 5
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default building new application starting with alarm clock source code

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.

iduke is offline  
Reply With Quote
Sponsors
Old January 5th, 2010, 05:20 AM   #2 (permalink)
Member
 
eclipsed4utoo's Avatar
 
Join Date: Nov 2009
Location: Florence, SC
Posts: 435
 
Device(s): Motorola Droid
Thanks: 9
Thanked 27 Times in 11 Posts
Default

What are some of the compile errors?
__________________
If you like MotoTorch LED, you could Donate With Paypal toward its continued development.

You can also buy the Donation version of MotoTorch LED from the Android Market.

Use Barcode Scanner or Shop Savvy to scan my avatar.
eclipsed4utoo is offline  
Reply With Quote
Old January 6th, 2010, 01:52 AM   #3 (permalink)
New Member
 
Join Date: Jan 2010
Posts: 5
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
iduke is offline  
Reply With Quote
Old January 6th, 2010, 06:59 AM   #4 (permalink)
Member
 
eclipsed4utoo's Avatar
 
Join Date: Nov 2009
Location: Florence, SC
Posts: 435
 
Device(s): Motorola Droid
Thanks: 9
Thanked 27 Times in 11 Posts
Default

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).
eclipsed4utoo is offline  
Reply With Quote
Old January 6th, 2010, 08:38 AM   #5 (permalink)
New Member
 
Join Date: Oct 2009
Posts: 8
 
Device(s):
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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
draffodx is offline  
Reply With Quote
Old January 6th, 2010, 12:27 PM   #6 (permalink)
New Member
 
Join Date: Jan 2010
Posts: 5
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
iduke is offline  
Reply With Quote
Old January 6th, 2010, 12:44 PM   #7 (permalink)
Member
 
eclipsed4utoo's Avatar
 
Join Date: Nov 2009
Location: Florence, SC
Posts: 435
 
Device(s): Motorola Droid
Thanks: 9
Thanked 27 Times in 11 Posts
Default

Quote:
Originally Posted by iduke View Post
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?
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.
eclipsed4utoo is offline  
Reply With Quote
Old February 3rd, 2010, 05:28 PM   #8 (permalink)
New Member
 
Join Date: Jan 2010
Location: Zurich
Posts: 9
 
Device(s):
Thanks: 0
Thanked 2 Times in 2 Posts
Default Don't do that

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.
kosiakk is offline  
Reply With Quote
Old February 3rd, 2010, 05:43 PM   #9 (permalink)
New Member
 
Join Date: Jan 2010
Location: Zurich
Posts: 9
 
Device(s):
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by iduke View Post
I was hoping not to have to rewrite code for setting alarms and alarm preferences
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.
kosiakk is offline  
Reply With Quote
Old March 3rd, 2011, 12:53 PM   #10 (permalink)
New Member
 
Join Date: Mar 2011
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sunrise Alarm clock

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?
wiab21 is offline  
Reply With Quote
Sponsors
Old April 29th, 2011, 02:27 AM   #11 (permalink)
New Member
 
Join Date: Feb 2011
Posts: 12
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Alarm

Hi,
I'm New to the android.I'm also doing the alarm app.i have some problem.You told I download the source code at this link
android.git.kernel.org Git - platform/packages/apps/AlarmClock.git/summary .I saw the this link but i didn't get resource.Can you help me ......
naveen03 is offline  
Reply With Quote
Old May 2nd, 2011, 07:03 AM   #12 (permalink)
New Member
 
Join Date: Feb 2011
Posts: 12
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Alarm

I downloaded the code from android.git.kernel.org Git - platform/packages/apps/AlarmClock.git/summary.It's showing the errors.If you have the URL can you send me ... Help me..........
naveen03 is offline  
Reply With Quote
Reply

Bookmarks


Go Back   Android Forums > Android Development > Application Development User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alarm Clock PlusV2: An alarm application that works great! Nuke209 Application Reviews 3 March 26th, 2012 08:20 PM
Error while building linux kernal source code for HTC G2 phone bhuvan Application Development 1 January 17th, 2011 12:49 AM
Help: source code building program can take picture or capture video cpw Android Applications 0 July 27th, 2010 10:22 PM
Building from Source code. santhosh.he Application Development 1 December 23rd, 2009 07:57 AM
Getting application source code yulebern Application Development 0 July 2nd, 2009 01:47 PM



All times are GMT -5. The time now is 11:40 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo