title: How to use a thread to parse xml file in a splash screen?
body: <p>I made a splash screen and used a runnable thread to parse a xml file from server, but when I run this program , it just stuck at the splash screen, and I used a wifimanage to judge whether the device is connected to the Internet or not, if it is not, then skip the parsing and jump to the main activity.</p>
  
  <p>here are some of my codes, would someone be so kind to check it out?</p>
  
  <pre><code>private static WifiManager mWifiManager;
      private static UpdateInfo info;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.loading);
  
          mWifiManager = (WifiManager)
                  this.getSystemService(Context.WIFI_SERVICE);
      }
      public UpdateInfo getUpdateInfo(InputStream is) throws Exception{  
          if (mWifiManager.getWifiState()==WifiManager.WIFI_STATE_ENABLED){
          XmlPullParser  parser = Xml.newPullParser();    
          parser.setInput(is, "utf-8");//设置解析的数据源   
          int type = parser.getEventType();  
          info = new UpdateInfo();//实体  
          while(type != XmlPullParser.END_DOCUMENT ){  
              switch (type) {  
              case XmlPullParser.START_TAG:  
                  if("version".equals(parser.getName())){  
                      info.setVersion(parser.nextText()); //获取版本号  
                  }else if ("url".equals(parser.getName())){  
                      info.setUrl(parser.nextText()); //获取要升级的APK文件  
                  }else if ("description".equals(parser.getName())){  
                      info.setDescription(parser.nextText()); //获取该文件的信息  
                  }  
                  break;  
              }  
              type = parser.next();  
          }  
          }else{
               Intent intent = new Intent ();
               intent.setClass(loading.this, monkeynote.class);
               startActivity(intent);
             }
  
          return info;  
  
      } 
  </code></pre>