Determine whether charger plugged in or running on battery?

Put your problem here if it does not fit any of the other categories.

Determine whether charger plugged in or running on battery?

Postby Graham » Sun May 02, 2010 11:49 am

Hi,

Forgive me I'm sure this has been covered but I searched couldn't find anywhere.

I want my program to stop playing music when the charger is plugged in, and start playing again when plugged in again etc.

How do I do these two things:

1. Check weather running battery/charging?

2. Handle an event for when this is charging status changed (eg. charging started/charging stopped) within my program?
-- Graham
Graham
Freshman
Freshman
 
Posts: 7
Joined: Sun Mar 22, 2009 10:18 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 23 guests