Drawing pad future plan

We learnt how to save data both locally and remotely.

In mobile app, we should not think the internet is always available. In PhoneGap, we can use the connection to know which type of connection the device currently uses.

navigator.network.connection.type

We can treat the connection as reliable when the value is Connection.WIFI. While it is Connection.CELL_3G or Connection.CELL_4G, we can assume the user is on the go and network may become unrelaible sometimes. When the type is Connection.NONE, the device losts connection.

In our drawing pad example, we can store the drawings locally with WebSQL and send to the web service when the network is fast enough.

What’s next? We’re going to take a look at “Project 11 – Accessing Device Resources”.

overlaied image when clicked on thumbnail

Makzan | Mobile web app dev with phonegap | Table of Content