Guest User

Untitled

a guest
Jul 16th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function NetworkError()
  2. {
  3. Titanium.API.debug("Created NetworkError object");
  4.  
  5. function pollNetCheck()
  6. {
  7. Titanium.API.debug("Polling network");
  8. if(this.checkNetwork() === false)
  9. {
  10. clearInterval(this.polling);
  11. this.displayNetworkError();
  12. }
  13. }
  14. function checkNetwork()
  15. {
  16. if(Titanium.Network.NETWORK_NONE)
  17. {
  18. Titanium.API.error('Error: No network');
  19. return false;
  20. }
  21. Titanium.API.info('Were on ' + Titanium.Network.networkTypeName);
  22. return true;
  23. }
  24. function displayNetworkError()
  25. {
  26.  
  27. }
  28. }
Add Comment
Please, Sign In to add comment