how to start commit Fragment in FirebaseMessagingService

后端 未结 3 2061
感情败类
感情败类 2021-01-27 08:27

I used FireBase could messaging in my application and I want when the user receive message the activity fragment change. I did the following code for that but i don\'t know why

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-27 08:46

    getFragmentManager() is a method of Activity, therefore it can't work in a Service.

提交回复
热议问题