Check network availability, replace local file with one returned by remote server

Hello community,
I have a simple mobile application showing a contact list like this one:

The CRUD of the contact list is done using a back office. The mobile application should connect to the remote server and get the data (contact, name and avatar)
When the mobile application start check if exists a valid connection. If it exists, the application should get the latest data from the server, consuming a REST service that should return a json file. If not, the application should use the local file.

My questions are:

  1. How to check if a network is available on an iOS and Android mobile app? Any example available?
    1. How to refresh the data? Should i replace the json file it with the new one? Any thoughts about it?Any example available (delete and create a local file)?
  2. From my research it’s possible to sent a image using json format, but i don’t know if it’s the correct way to do it. Any suggestion?