title: Android - How to access Room database from widget
body: <p>i wanted to access Room DB inside my widget class to update the widget according to the stored data.</p>
  
  <p>the problem here is the ViewModelProvider require a fragment or activity to work with..</p>
  
  <blockquote>
    <p>ViewModelProviders.of(fragment).get(YourViewModel.class);</p>
  </blockquote>
  
  <p>which is not available in the app widget class so how to do it?</p>