title: WorkManager get time of next scheduled work by tag
body: <p>I am using <a href="https://developer.android.com/topic/libraries/architecture/workmanager/basics" rel="noreferrer">WorkManager</a> to schedule both periodic and one-time work, and I am tagging all of the work with the same tag so that I can identify it later:</p>
  
  <pre><code>workRequestBuilder.addTag("mywork");
  </code></pre>
  
  <p>With various work items enqueued, at various times in the future, I would like a way of querying the work queue to determine when the <em>next</em> work is scheduled to run for this particular tag (<code>"mywork"</code>).  Yes, I know that it will not be exact and will be subject to Doze etc, but it would still be useful to know when -- in the absence of other factors -- the work is likely to run.</p>
  
  <p>I know how to query the work queue and pick out enqueued work items as follows, but I'm just not sure how to tell what time each work item is scheduled to run:</p>
  
  <pre><code>WorkManager workManager = WorkManager.getInstance();
  ListenableFuture&lt;List&lt;WorkInfo&gt;&gt; workInfos = workManager.getWorkInfosByTag("mywork");
  
  try {
      List&lt;WorkInfo&gt; workInfoList = workInfos.get();
      for (WorkInfo workInfo : workInfoList) {
          WorkInfo.State state = workInfo.getState();
          if (state == WorkInfo.State.ENQUEUED) {
              UUID workerId = workInfo.getId();
              Log.d(TAG, "found enqueued work with id " + workerId);
              // BUT HOW DO I TELL WHAT TIME THIS WORK IS SCHEDULED TO RUN?
          }
      }
  } catch (ExecutionException e) {
      e.printStackTrace();
  } catch (InterruptedException e) {
      e.printStackTrace();
  }
  </code></pre>