Hello.
Could you specify what you require?
Device can send data as long as it is powered on, it does not matter if it is powered on by external or internal battery.
Unplug detection event only informs when device was disconnected from an external power source.
Best Regards