Hello,
Welcome to our Microsoft Q&A platform!
I also need to look for new messages even when applicaiton is totally closed.Is there any method which i can do that? Do i need to create an endless background > service? Is there any other way?
For Android, if you have background service, it will be closed in Android will grant the app a certain amount of time(Nearly 10 minutes) to start and use services. Once that time has elapsed, the app can no longer start any services and any services that were started will be terminated. Due to the Background Execution Limits in Android 8.0.
For iOS, background task typically get about 600 seconds (10 minutes) of processing time after an application has moved to the background on iOS 6, and less than 10 minutes on iOS 7+
You can try to use FCM to make a test. - Handled by the client app. These messages trigger the onMessageReceived() callback even if your app is in foreground/background/killed.
Best Regards,
Leon Lu
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.