as said below create a sysfs entries for the aleart. 1. for checking for the alert (it could be something like toggling the switch- saying true or 1 when you have a message and false or 0 when no message). 2. for message
create a handler in the android stack to watch 1st sysfs entry to check for the aleart. create a intent observer which pops alert on the lcd. make sure the system by default registers for this intent. when a alert from kernel is given, you handler should be able to recognize it by realizing that the switch is toggled from false to true using cat the 2nd sysfs entry you can get the message content. immediately broadcast an intent to the registered observers and from there your observer should be able to pop and alert message on lcd. if you not keen of knowing the message from the kernel you can go ahead and create only one sysfs entry and use the same logic. - Preetam On Tue, Nov 1, 2011 at 8:11 PM, Tiago Maluta <[email protected]> wrote: > you can create a file [1] as a sysfs entry on your system, create a > android service pooling that information and display to user. > > [1] example: you can create a "notifications" file and put printk content. > > $ cat /sys/kernel/notifications > YOUR MESSAGE > > --tm > > On Fri, Oct 28, 2011 at 11:05 AM, andria <[email protected]> wrote: > > Hi, > > > > I work on a kernel module that sometimes raises an alert thanks to > > printk. I want to improve it by raising the alert in the user space > > like a notification in the status bar. Does anyone know how this can > > be done? One way to do it is to do like the sms notification because > > as far as I know there is something related to sms an call at kernel > > level but I don't know here exactly. So any idea? > > > > Thanks, > > > > Andria > > -- > unsubscribe: [email protected] > website: http://groups.google.com/group/android-kernel > -- "The great pleasure in life is doing what people say you cannot do" -- unsubscribe: [email protected] website: http://groups.google.com/group/android-kernel
