Reputation: 75
I've looked for examples on how to get the android device LED to blink and I've gotten the message about not being able to resolve LED_NOTIFICATION_ID to a variable. My code is below. Is there anyone that can tell me why I'm receiving this error?
private void redFlashLight(Context context)
{
NotificationManager nm = ( NotificationManager ) context.getSystemService( context.NOTIFICATION_SERVICE );
Notification notif = new Notification();
notif.ledARGB = 0xFFff0000;
notif.flags = Notification.FLAG_SHOW_LIGHTS;
notif.ledOnMS = 100;
notif.ledOffMS = 100;
notif.flags = Notification.FLAG_SHOW_LIGHTS | Notification.FLAG_ONLY_ALERT_ONCE;
nm.notify(LED_NOTIFICATION_ID, notif);
}
Upvotes: 0
Views: 682
Reputation: 66891
You haven't declared LED_NOTIFICATION_ID
as a variable then. Look for misspellings. Is it supposed to be qualified with a class name?
Upvotes: 2