I have a service and some activity for that , I want whole application will restart at specific time like (03:00 pm), do you know any way to to do this , so at 3AM , the whole app restart ?
thanks
I have a service and some activity for that , I want whole application will restart at specific time like (03:00 pm), do you know any way to to do this , so at 3AM , the whole app restart ?
thanks
You can use popular time based scheduler Cron found in unix/linux. by default it it is not active.need some hack inside. but i think you can use AlarmManager This is a system service.
AlarmManager myAlarmManager = Context.getSystemService(Context.ALARM_SERVICE).
And if you need to stay alive after system reboot . Then you have to schedule he alarm after the device reboots.And need to have the RECEIVE_BOOT_COMPLETED permission in your AndroidManifest.xml