如何从主要活动中激活FirebaseMessagingService.onMessageReceived?

时间:2017-03-15 19:12:27

标签: android firebase service firebase-cloud-messaging firebase-notifications

出于测试目的,我想从我的应用程序的主要活动中以编程方式触发从FirebaseMessagingService扩展的MyFirebaseMessagingService类的onMessageReceived方法。我怎么能这样做?

public class MyFirebaseMessagingService extends FirebaseMessagingService {

    @Override
    public void onMessageReceived(RemoteMessage remoteMessage)
    {         
       // I would like to arrive here           
    }
}

谢谢!

0 个答案:

没有答案