I want to schedule my application.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
try this
// Get the current application descriptor.
ApplicationDescriptor current = ApplicationDescriptor
.currentApplicationDescriptor();
// Schedules are rounded to the nearest minute so ensure the
// application is scheduled for at least 1 minute in the future.
ApplicationManager.getApplicationManager().scheduleApplication(
current, System.currentTimeMillis() + 60001, true);
For more details you can read this article also. Schedule an application to run at a specific time