Why and How to Save Data

0
138

As I mentioned previously, you don’t have full control over when your application becomes inactive or is terminated. Think of your application flow and building blocks and determine which states are important to save and under what circumstances.

Saving data is essential for a good user experience and for continuity. Saving should be considered when the application is about to exit, when it goes to the background, and at small intervals while your application is active.

To keep your audience engaged, avoid having them go over the same introductory steps every time they launch your application. Instead, bring them directly to the application’s core. Your application may be the scheduler of an event occurring over several days. Keep track of the date it was last used and display it first the next time the application is opened.

Persistent data may be an important component of your application, as in a game where the usernames and scores are saved and can be improved upon. If your game was interrupted in the middle of game play, keep track of its progress and display it in the same state the next time it is visible.

Data may be an essential part of your application if the user has the opportunity to build a library of information to manipulate and save over time. If your application is a utility for collecting a selection of images, a storage mechanism is the core of its functionality.