Thanks Saurav
i will try and then tell u
infact i want to take time form user and then set the alarm using alarm
clock app in android

i think it will help
thanks again

On Wed, Mar 24, 2010 at 10:06 PM, Saurav <[email protected]>wrote:

> i can help u with the alarm setting, but is that wat u want? or do u want
> to use the whole alarm clock application. i dont think that is possible.
>
> here is a snippet that'll show u how to set the alarm, but the pending
> intent is wat shud happen when the alarm goes off!
>
> static void schedule(Context context) {
>         final Intent intent = new Intent(context,
> CheckUpdateService.class);
>         final PendingIntent pending = PendingIntent.getService(context, 0,
> intent, 0);
>
>         Calendar c = new GregorianCalendar();
>         c.add(Calendar.DAY_OF_YEAR, 1);
>         c.set(Calendar.HOUR_OF_DAY, 0);
>         c.set(Calendar.MINUTE, 0);
>         c.set(Calendar.SECOND, 0);
>         c.set(Calendar.MILLISECOND, 0);
>
>         final AlarmManager alarm = (AlarmManager)
> context.getSystemService(Context.ALARM_SERVICE);
>         alarm.cancel(pending);
>         if (DEBUG) {
>             alarm.setRepeating(AlarmManager.ELAPSED_REALTIME,
> SystemClock.elapsedRealtime(),
>                     30 * 1000, pending);
>         } else {
>             alarm.setRepeating(AlarmManager.RTC, c.getTimeInMillis(),
>                     UPDATES_CHECK_INTERVAL, pending);
>         }
>     }
>
>
> hope this helps u.
>
>
> Regards,
> Saurav Mukherjee.
>
>
> On Wed, Mar 24, 2010 at 10:15 PM, Ali Murtaza <[email protected]>wrote:
>
>> Hi
>>
>>
>> I want to use the alarm clock applicaiton in my applicaiton plz tell me
>> how i will use
>> i am new in android
>>
>> --
>> Ali Murtaza
>>
>> BCSF06M021
>> Research Assistant
>> Data Virtulization Ware House
>> PUCIT, Lahore, Pakistan
>> [email protected]
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<android-developers%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>> To unsubscribe from this group, send email to android-developers+
>> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
>> ME" as the subject.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
> To unsubscribe from this group, send email to android-developers+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>



-- 
Ali Murtaza

BCSF06M021
Research Assistant
Data Virtulization Ware House
PUCIT, Lahore, Pakistan
[email protected]

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to