Reboot (or just shutdown) the device.
Unfortunately, this is not a 'clean' shutdown. Neither Android nor running applications are informed that the device is rebooting, so be prepared for possible data corruption.
On the other hand, every other app that allows reboot does it the same way.