1

I am using FCM Cloud messaging to get notifications. While Google search I found that When application either in background state or quit, data payload received on "onMessageReceived" method of FirebaseMessagingService service.

What my question is, How can I debug the services when the application is closed or quit(not running) state.

If I can't please suggest me any better alternative to check the flow in the services.

AL.
  • 36,815
  • 10
  • 142
  • 281
john
  • 11
  • 4

1 Answers1

1
  1. You can use Logcat to log the events happening in the Service to understand.

Example:

Log.d(TAG, "onStart()");

  1. In case you you want to specifically debug then follow the articles mentioned by @brat.

Debugging a service

Note: Make sure your Service is running in the background.

Community
  • 1
  • 1
Akshay Chordiya
  • 4,761
  • 3
  • 40
  • 52