title: Android - Access LiveData Repository in BroadcastReceiver or Service
body: <p>Im using MVVM Pattern and my Repository uses LiveData. But I need to access the data from BroadcastReceiver or IntentService. LiveData doesn't work in BroadcastReceiver because of missing LiveCircle and I read it isn’t recommended in Services. Do I need to change my Repository to ReactiveX or what's the best practise in this case?</p>
  
  <p>Repository:</p>
  
  <pre><code>object MainRepository : Repository {
  
      override fun getGeofences(context: Context): LiveData&lt;List&lt;GeofenceModel&gt;&gt;? {
          return GeofenceDatabase.getInstance(context.applicationContext)?.geofenceDao()?.getGeofences
      }
  
      override fun createGeofence(context: Context, geofenceModel: GeofenceModel) {
          GeofenceDatabase.getInstance(context.applicationContext)?.geofenceDao()?.createGeofence(geofenceModel)
      }
  }
  </code></pre>