I used the callback function for device insertion inside which I check
for ac_adapter namespace (libhal) and check for its presence.

This gives charger inserted or not.

But now I want to detect the changes in battery level. Any idea how to
do that?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Simon Budig
Sent: Wednesday, September 17, 2008 2:29 AM
To: [email protected]
Subject: Re: Charger connected State

unknown ([EMAIL PROTECTED]) wrote:
> If you want to read it directly from the hardware, ADC #3 of retu chip
> gives this information.

Depending on your application it might be easier to monitor the dbus
signals that happen when the charger gets inserted or removed.

I don't have sample code available right now, but the signals are
clearly visible when looking at the output of "dbus-monitor --system".

Hope this helps,
        Simon

-- 
              [EMAIL PROTECTED]              http://simon.budig.de/
       [EMAIL PROTECTED]      http://www.kernelconcepts.de/
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. 
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in 
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates. 
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of 
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and 
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------
_______________________________________________
maemo-developers mailing list
[email protected]
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to