Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49257

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

$
0
0

@l1nk wrote:

Hello community,
I have a simple mobile application showing a contact list like this one:
http://ionicframework.com/docs/components/#item-avatars

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?
  2. 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)?
  3. 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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>