You are developing a mobile application for a global audience that needs to store data on a Google Cloud serverless database. The application will handle user profiles, chat messages, and in-app purchases. Users may have intermittent internet connectivity, and you need to ensure that the application can synchronize data with the backend database when the network is available. What should you do?