Я хочу использовать LiveData в моем LifecycleObserver, но мне нужно передать Activity. Как мне это получить?
public class ChatFragmentLifecycleObserver implements LifecycleObserver {
@OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
void onCreate(LifecycleOwner owner) {
ChatViewModel chatViewModel = ViewModelProviders.of(*here I need the Activity*).get(ChatViewModel.class);
}