Android Batterystats Report
I'm definitely not a expert on this but hopefully I can be a little help.

Usually the devices measure the voltage of the battery.
When a battery is discharged it gradually degreases it voltage level.
When the voltage level is dropped below a certain point the hardware doesn't work anymore.
This is one of the reasons why the older ipod/ipad/iphone devices didnt shut down at 0% battery but a lot earlier (If I remember correctly my old ipod touch would shut down around 11%.

EEVblog made a great video about debunking a product that claims that it can extend battery life of electronic products EEvblog Video. Too debunk the product he gives a lot of information about what happens when battery discharges and about when electronic devices shut down.

Hopefully can this information help you a little bit with your project.