Hi Andria,
You can Poll from the User Space using "Handlers" as Preetam mentioned.
But "Polling" is bad. Instead you can use UEvents.
The ideal (Android) way would be:
1. Let your kernel module send an UEvent, whenever the alert raises.
This can be done by KOBJ_UEVENT(,,.,,)
2. Create a Simple Service in UserSpace that has an UEventObserver. Register this Observer with your
KOBJ device path name.
You can have a look at
android/frameworks/base/services/java/com/android/server/BatteryService.java
to figure out how to use UEventObservers.
3. Whenever you send the UEvent, this Observer will be called by the Android Framework. Inside the observer
code, you can broadCast an Intent to notify other Services/Apps, that can raise a 'notification' or 'Toasts' or
'Alerts'.
Thanks,
Durga
Regards
Durgadoss