How can I detect if my Android app is in the background or foreground please?
This is to only send push notification when the application is in the background. I need to perform this check in :
public class MyFirebaseMessagingService : FirebaseMessagingService