4 Replies Latest reply on Feb 15, 2010 7:22 AM by Mihai Balan

    Detect wireless Internet connection in AIR application

    Hitesh_Patel Level 1

      Hi All,

       

      I am facing challenges to determine whether Internet connection is available over a Wireless connection. Even if I am connected, I get the status as Not Connected.

       

      However the same is working absolutely find when I am connected to Wired network.

       

      Can any one advice how should I proceed?

       

      I am using the below code for tracking network connection:

       

           //check for network availability
           NativeApplication.nativeApplication.addEventListener(Event.NETWORK_CHANGE, onNetworkChange);
                    
          monitor = new URLMonitor(new URLRequest('http://www.google.co.in'));
          monitor.addEventListener(StatusEvent.STATUS, announceStatus);
          monitor.start();
                    
          requestLoader.addEventListener(Event.COMPLETE, requestCompleteHandler);
          requestLoader.addEventListener(IOErrorEvent.IO_ERROR, requestErrorHandler);              
          requestLoader.load(request);
          requestLoader.addEventListener(Event.COMPLETE, setInitStatusMsg);

       

      The corresponding methods have been set to set the boolean flag.

       

      Thanks,

      Hitesh Patel.