i also tried a lot of times before i found that you need to specified the
trigger time to second at least(,you can set 0 to second and minisecond
),if u just do things like
c.set(wv_year.getCurrentItem() + START_YEAR, wv_month.getCurrentItem(),
wv_day.getCurrentItem() + 1, wv_hours.getCurrentItem(),
wv_mins.getCurrentItem(), 0);
and use c.getTimeInMillis() as the trigger time...it will not working
,remember to add:
c.set(Calendar.SECOND, 0);
c.set(Calendar.MILLISECOND, 0);
On Friday, January 11, 2013 3:11:16 PM UTC+8, Avinhood wrote:
>
> Hi,
>
> I am trying to set an alarm for a specified time on click of a button and
> at that time, the alarm should ring.
> I tried several codes on the net and stackoverflow, but strangely none of
> them are practically working .
> I set the pending intent, and the receiver and required changes in
> manifest.
>
> it would be nice if someone can provide a working code.
>
> --
> Avinash Shyam
>
--
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