I know there is a way where we can reboot the device. And it shows immediate result.
But my need is as :-
I want that when I will be in my class-room my phone automatically goes to OFF. (Lets say at 2:00 PM), and when I will end my class, my phone will automatically ON (Lets say at 5:00 PM).
So I am looking for the ways where I can ON/OFF the device automatically.
Is this possible? If yes how can I do it?
No. Third party applications do not have the permission to do that.
Check out these links
http://developer.android.com/reference/android/os/PowerManager.html
http://developer.android.com/reference/android/content/Intent.html#ACTION_SHUTDOWN