If you're rooted you can add a reboot (from busybox let's say) and issue "reboot" command.
If you're rooted and want to add it to the poweroff menu(where the screenshot it etc..) then either you have to decompile your APM or use xposed framework to add it.
If you're rooted... but if you want to sell your app, you can not think that your buyers have the device rooted (EVEN for this reason I will never do this).