0

I did some research and I found these tools coggle, I don't know if it is possible to do this and if it is, how to do the background tasks in a way that I can receive notifications even when the app is closed, how to handle socket connection when the app is closed ?

I already seen this question and I am asking if there is a solution now.

  • use onesignal,framework that works both for ios/android and it free,you can use there api – Abd Nov 19 '21 at 14:18
  • thanks for the comment but I want to know if it is possible to do without 3rd party services onesignal has its own pricing it is not totally free – Wathek Khlifi Nov 21 '21 at 17:44
  • to be honest i use it,it is free if you don't need to alot of customizations,it is really hard without onesignal you will need to impelement the following , push notification server for ios and you will 100% write native code,it is not very complex most of the work will be done in appdelegate in ios (objective-c) then you will need to impelement a bridage from objective c to react native javascript /for android you will need to create a custom activity for that and do the same,if you are not very experienced in writing native i don't recommend that – Abd Nov 21 '21 at 17:50
  • about handling socket connection when app is closed,well there is nothing to do,unless you write native,you need to reconnect when is app is opened – Abd Nov 21 '21 at 17:53
  • Sorry for late answer. I was thinking of an easier solution of using react-native-background-actions or react-native-background-tasks to request notifications list from server every 15min and when the app is open I'll use socket communication for real-time notifications. Thank you for the valuable answer. – Wathek Khlifi Nov 21 '21 at 19:01

0 Answers0