This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// This gist explains how to test alternate paths based on device capabilities which are not under your control, | |
// eg. presence of network, network quality(3G, Edge, GPRS), ... | |
// | |
// | |
// When this code would be executed in the titanium runtime, the only way to test both code branches is by switching | |
// the network on/off. | |
// | |
function isNetworkPresent(){ |