title: How to set different Work manager Constraints for WIFI and cellular data
body: <p>In my application I am using Work manager for Periodic Work. In below code if device has internet connection my work is executing after every 4 hr. </p>
  
  <pre><code>PeriodicWorkRequest.Builder myWorkBuilder =
                  new PeriodicWorkRequest.Builder(FileUpload.class, 4,
                          TimeUnit.HOURS)
                          .setConstraints(new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build());
  
          PeriodicWorkRequest myWork = myWorkBuilder.build();
          WorkManager.getInstance().enqueueUniquePeriodicWork("myJob", ExistingPeriodicWorkPolicy.REPLACE,myWork);
  </code></pre>
  
  <p>Now I want to change time - If device is connected to WIFI then work should execute after every 20 min and if device is connected to cellular data then work should execute after 12 hrs. How to achieve this. Thanks in advance</p>