Reseting the device while the application runs is kind of out of the normal usage. The only thing that you can do is detect it, and, if your app deals with documents, recover the last autosaved version. Do autosave as much as you are capable of, without degrading user experience.
As for the detection, you can place a temporary file into the application's directory on startup, and remove it during normal the shutdown of it. This will also help when your application crashes for some reason.
All in all, you can't provide a perfect solution for this. If you use MS Office, you can see a similar approach I described here. I know we can't except high enough level of idiocy from the users, but I think most of them will understand that resetting the device won't do any good for the running apps.
Edit: I misunderstood the OP's question. I keep the above parts for reference. Well, if you need to reinstall the app, you can't do anything. You didn't tell us much about you application, but you may store some data on a remote server and have your users login when they install the app.