title: Android WorkManager not starting the worker
body: <p>I want to download certain files from the server at the start of the app .So I tried using Work Manager which gets enqueued from my custom Application class.But the Worker class is not getting triggered and the <strong>state is only ENQUEUED and not going to RUNNING</strong>.Below is my code:</p>
  
  <p><strong>Application class:</strong></p>
  
  <pre><code>@Override
  public void onCreate() {
      Constraints constraints = new Constraints.Builder()
              .setRequiredNetworkType(NetworkType.CONNECTED)
              //.setRequiresStorageNotLow(true)
              //.setRequiresBatteryNotLow(true)
              .build();
  
      OneTimeWorkRequest request = new OneTimeWorkRequest
              .Builder(MyWorker.class)
              //.setConstraints(constraints)
              //.setInitialDelay(1,TimeUnit.SECONDS)
              .addTag("download")
              .build();
  
      WorkManager.getInstance(getApplicationContext()).getWorkInfoByIdLiveData(request.getId()).observeForever(new Observer&lt;WorkInfo&gt;() {
          @Override
          public void onChanged(WorkInfo workInfo) {
              if (workInfo == null) {
                  Log.d("download", "workInfo == null");
              } else {
                  Log.d("download", "workInfo != null: " + workInfo.getState().toString());//This is giving ENQUEUED once..thats it
              }
          }
      });
      WorkManager.getInstance(getApplicationContext()).enqueue(request);
  }
  </code></pre>
  
  <p><strong>MyWorker class</strong></p>
  
  <pre><code>public class MyWorker extends Worker {
  
  public MyWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) {
      super(context, workerParams);
  }
  
  @NonNull
  @Override
  public Result doWork() {
      //Some file to download 
  }
  }
  </code></pre>
  
  <p><strong>build.gradle:</strong></p>
  
  <pre><code>implementation "androidx.work:work-runtime:2.3.2"
  </code></pre>
  
  <p><strong>Things i have tried:</strong></p>
  
  <p>I tried adding an interval and also remove constraints, but then also, MyWorker is not triggered.</p>
  
  <p>I have seen many SOF posts as given below but it didn't help me:</p>
  
  <p><a href="https://stackoverflow.com/questions/57698710/worker-manager-not-start-work-in-enqueue">Worker manager: not start work in enqueue</a></p>
  
  <p><a href="https://stackoverflow.com/questions/51148201/why-workers-in-work-manager-still-in-enqueued-state?rq=1">Why workers in work manager still in ENQUEUED state?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/54456396/android-workmanager-doesnt-trigger-one-of-the-two-scheduled-workers">Android WorkManager doesn't trigger one of the two scheduled workers</a></p>