title: How to Pass POJO class in Work manager in android?
body: <p>How can we pass <strong>Serializable</strong> object in <strong>work manager</strong> by setData method of work manager? Is there any way to process with Work manager by passing object? </p>
  
  <p><strong>WorkManager is a library used to enqueue work that is guaranteed to execute after its constraints are met. WorkManager allows observation of work status and the ability to create complex chains of work.</strong></p>
  
  <pre><code> Map&lt;String, Object&gt; map = new HashMap&lt;&gt;();
   AddressBookData addressBookData = new AddressBookData();
   addressBookData.setThreadId(001);
  
   map.put("AddressBookData", addressBookData);
  
  
   Data data = new Data.Builder()
                      .putAll(map)
                      .build();
  
   OneTimeWorkRequest compressionWork =
                  new OneTimeWorkRequest.Builder(DataSyncWorker.class)
                          .setInputData(data)
                          .build();
  </code></pre>
  
  <p>It crash app and showing error like AddressBookData is not valid class.</p>
  
  <p><strong>Note: I want to pass POJO class in work manager and get InputData from work manager in doWork  Method.</strong></p>