Handling data is one aspect of mobile development that requires traditional application developers to adopt a different way of thinking. For instance, for many mobile applications it is important to persist (store) data when the user closes or switches away from the application, when an incoming call is received, or when the application is forced to shut down for some other reason. In addition, mobile application Views are destroyed and recreated often. As a result you'll need to think about how to handle your data between views. So, the two main scenarios in which you need to save data are:
- Between application executions (that is, when closing and restarting the application)
- Between views within your application