I am not sure of the correct terminology for my question. I am trying to show obvious activity on a slower network connection when populating a grid with REST results like the pagination tutorial here:
http://docs.tiggzi.com/tutorials/buil...
My app actually works very well when connected via a descent network, but while waiting for page to load with a spotty 4g service connection, all I see is the next button. There is no spinner and no results. Granted, my results to do include outside web image links and a connection to the tiggzi database.
I tried to mitigate obvious problems by using phonegap to warn users with slow connections. If they are using 2/3g or had no connection then I alert that the app would not work. When the page loads, on event of device ready I run javascript like:
var networkState = navigator.network.connection.type;
var states = {};
states[Connection.CELL_2G] = 'Cell 2G';
states[Connection.CELL_3G] = 'Cell 3G';
states[Connection.NONE] = 'No network connection';
var net=states[networkState]
if (net=='Cell 2G'){
alert('Connection type: ' + states[networkState] +' may be too slow. For best results try wi-fi or 4g network.');
}
...
Is there a better way of showing the display attempt? or perhaps a lack of connection to database or lack of a response?