I have an application that is distributed into a series of apps. I would like to provide users with a method of clearing their user data. To do this I would like each app to clear it’s user data. I have this part working correctly.
My question is, once I have cleared the user data, is there a way of restarting the applications, so that the restored settings take effect?
This blog post by Jan Jonas offers a good explanation of how to restart an application programatically.
The approach is to create a restart intent, and add it to the alarm manager, with a time offset (so that it doesn’t happen immediately.