I'm trying to develop a cross platform application using Angular+Nativescript. I need to capture the battery percentage of a mobile device when it is attempted to be switched off.
I have obtained the nativescript plugin to capture the battery levels. But I need to know in which event will I be able to capture the mobile switching off action and store the battery level before it happens.
Any help is greatly appreciated!