WSDOT / wsdot-mobile-app

Source code for the WSDOT HTML5 mobile Web application
GNU General Public License v3.0
13 stars 4 forks source link

App fails to open if there is no Internet connection #11

Closed waynedyck closed 1 year ago

waynedyck commented 9 years ago

This is likely because of the need to download the external Google Maps JavaScript via the GWT-Maps-V3-Api library. The app tries to download the library and hangs when it cannot.

We might be able to use the Connection Module in GWT-PhoneGap to check for the current connection state. If there is not an Internet connection, simply skip loading the library and display a warning message if one tries to access the traffic map.

loganSims commented 8 years ago
if (phoneGap.getConnection().getType().equals(Connection.NONE)
    || phoneGap.getConnection().getType().equals(Connection.UNKNOWN)){

This will fire the app up when connections are turned off. If there is a very weak connection it still seems to hang, or at least takes an unreasonably long time to load. Running the network link conditioner set to 100% loss still counts as a connection and the app will try to load the map.

Still need to workout how to handle warning message about traffic map.

loganSims commented 8 years ago

PhoneGap Events Module There is an online & offline event.