If this is an app you are making for rooted devices, then this can be
done with a
su
reboot
commands...
Otherwise, non-rooted apps, this cannot be performed:
"Only system applications and applications signed with the same key that was used to sign the firmware will be able to get that permission."