I would find a way to reopen the last opened book at startup, if I shut down when the book was opened.
What I want to do is to write the document path to some file before the device is shut down if the document is open, and re-open the document when the OS is ready. The problems are:
What I want to do is to write the document path to some file before the device is shut down if the document is open, and re-open the document when the OS is ready. The problems are:
- how can I insert an action before the shutting down?
- where can I find the last opened document? I'm quite sure this information is stored somewhere (the db?)
- how can I open a document?