title: need to run service while device got wifi/data connection
body: <p>Last time, I use following coding to run background service.</p>
  
  <pre><code>Intent intent = new Intent(InitActivity.this, GetService.class);
  PendingIntent pintent = PendingIntent.getService(InitActivity.this, 0, intent, 0);
  Calendar calendar = Calendar.getInstance();        
  AlarmManager alarm = (AlarmManager)getSystemService(Context.ALARM_SERVICE);                
  alarm.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 50 * 1000, pintent);
  return getZipInfo.toString();
  </code></pre>
  
  <p>to make better performance, I want to run my background service once device is connect WIFI/data connection. To make clear, if device is not connect wifi/data connection, my background service will not run for sure. Once connect wifi/data connection, it will run immediately.</p>