title: Periodic Work Request not executing doWork in Work Manager
body: <p>I'm trying to get data from a remote url periodically using <code>PeriodicWorkRequest</code> in <code>WorkManager</code>. I have implemented the logic, the issue here is that i don't get any response from the <code>Worker</code>. <p>However it seems to call <code>doWork()</code> at first launch, but it doesn't get data from the network call. I am surprised that when i use <code>OneTimeWorkRequest</code> i get a success result from <code>doWork()</code> and the data from server as well.</p>
  
  <p>what could i be doing wrong?</p>
  
  <p>code below:</p>
  
  <p><b>Worker Class</b></p>
  
  <pre><code>public class WorkerClass extends Worker {
  
  private Context context;
  public static final String EXTRA_WORKER_CLASS = "extra_tag";
  
  public SpecialOffer(@NonNull Context context, @NonNull WorkerParameters workerParams) {
      super(context, workerParams);
      this.context = context;
  }
  
  @NonNull
  @Override
  public Result doWork() {
      Log.d("WORKER_PERIOD", "started");
      String url = "https://sampleurl/get.php";
      //Volley synchronous call
      RequestFuture&lt;String&gt; future = RequestFuture.newFuture();
      StringRequest request = new StringRequest(url, future, future);
      MySingleton.getInstance(context).addToRequestQueue(request);
  
      try {
          String response = future.get();
          Data data = new Data.Builder()
                  .putString(EXTRA_SPECIAL_CARS, response)
                  .build();
          setOutputData(data);
          Log.d("WORKER_RESPONSE", response);
          return Result.SUCCESS;
      } catch (InterruptedException | ExecutionException e) {
          return Result.FAILURE;
      }
  }
  }
  </code></pre>
  
  <p><b>Method to call task</b></p>
  
  <pre><code>public void callTask(){
       PeriodicWorkRequest periodicRequest =
                  new PeriodicWorkRequest.Builder(WorkerClass.class, 15, TimeUnit.MINUTES)
                          .setConstraints(constraints)
                          .addTag("SPECIAL_OFFER")
                          .build();
  
          workManager.enqueueUniquePeriodicWork("SPECIAL_OFFER",
                  ExistingPeriodicWorkPolicy.KEEP, periodicRequest);
  
          workManager.getWorkInfoByIdLiveData(periodicRequest.getId())
                  .observe(getActivity(), workInfo -&gt; {
                      Log.d("WORKER_PERIOD", "observed");
                      // Do something with the status
                      if (workInfo != null &amp;&amp; workInfo.getState().isFinished()) {
                          Log.d("WORKER_PERIOD", "observed");
                          String ava = workInfo.getOutputData().getString(SpecialOffer.EXTRA_SPECIAL_CARS);
                          if (ava.equals("available")) {
                              showSpecialOffer(true);
                          } else {
                              showSpecialOffer(true);
                          }
                      }
                  });
  }
  </code></pre>