Hi All, I just found my problem:

This is the way to use notification from broadcastReceivers:
NotificationManager mgr =
(NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);

Schedule alarms from BroadcastReceivers: AlarmManager am =
(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);

You have to use the context prefix always!

Hope this is useful!

Juan

On Sat, Nov 1, 2008 at 12:35 PM, Juan David Trujillo C. <
[EMAIL PROTECTED]> wrote:

> Hi guys!
>
> I need to create a notification using the Notification Manager once an
> alarm goes off.  For this, I'm using a BroadcastReceiver, but I
> haven't been able to use the NotificationManager in the code inside my
> BroadCastReceiver.  What's the right way to do it?
> I also need to create a new alarm once the old alarm goes off.  How do
> I create the new Alarm from my BroadcastReceiver? I try to use
> Intents, but apparently Intents can't be used inside classes that
> extend BroadcastReceiver.
>
> Appreciate any help!
>
> Thanks




-- 
-------------------------------
Juan David Trujillo C.

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

Reply via email to