Re: Notifications for the low battery...?
Re: Notifications for the low battery...?
- Subject: Re: Notifications for the low battery...?
- From: Gregory Weston <email@hidden>
- Date: Tue, 21 Apr 2009 08:30:43 -0400
Anshul jain wrote:
I am developing a small Application to perform a Task. Which can
drain lot of battery(in Laptops).
IOKit provides the APIs to get the battery status but i was not able
to find the Notification which can notify the application when the
battery is Low.
So I want to get the Notifications for the low battery. Is this
Possible..?
Can anybody help me out.
I don't think there's a notification that the battery is low because
"low" is a subjective and situational concept. But you can get
notifications when the state of the power source changes. That would
include switching between battery and AC as well as changes in the
battery's charge level.
You'll want to look at pretty much all of the routines in
IOPowerSources.h, starting with IOPSNotificationCreateRunLoopSource().
Note, btw, that being sensitive to battery power is not restricted to
laptops. A desktop machine that has a data connection to its UPS is
also a valid target for such consideration.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden