The question is how to make it so that when you click a button in an application, restart this application. It looks like this: the user sees the content dialog: "Do you need to restart the application. Run now?" There are 2 buttons on the dialog: "Now" and "Later" (manually). It is necessary when you click the button to close the application now, unload it from memory and start it again.
It is possible to use Notification instead of dialogue. And when you tap on it, restart the application.