fcm icon indicating copy to clipboard operation
fcm copied to clipboard

Receive notification only the app is in foreground

Open GENL opened this issue 4 years ago • 1 comments

I build a mobile social network and I want to update the number of likes of a post using a push notification. But I don't want the users to be disturbed each time a post is liked when the app is in background. So is there a way to tell the mobile app to receive notification only when the app is in foreground?

Thanks

GENL avatar Jun 22 '20 08:06 GENL

@GENL This is possible for iOS, but for Android you have to make a background service and user should register this in settings. This service should allow you to process notifications even if user swiped the app. Like Skype does.

dan-leech avatar Jul 23 '20 14:07 dan-leech

Happy to look at any PR that wants to implement this functionality.

dwightwatson avatar Aug 31 '22 23:08 dwightwatson