Pregunta

Hi,

In my application I have a small registration form. I want the functionality to work like following

  • If the device is connected to network, data should be stored directly in server.
  • If device is not connected to network, then it should store temporarily in device and when the device connects to network it has to store the data in online server.

Please tell if this is possible and what is the right method to do it.

Thanks.

¿Fue útil?

Solución

  • Yes, it's possible
  • You can store whatever state you want locally and use one of the Reachability classes to see if a network connection is available and then attempt to run your network code to upload this state to the server.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top