how to broadcast Receiver and MVVM?

后端 未结 2 1914
星月不相逢
星月不相逢 2021-01-27 19:23

my manifest


            
                

        
2条回答
  •  太阳男子
    2021-01-27 19:40

    Use your Application class. either have a LiveData in it or a reference to a shared ViewModel. You can access Application using context.getApplicationContext() from NetworkChangeReceiver

提交回复
热议问题