Implement Background Tasks for my React-Native App

Job ID: 38741644

Budget: $10 – $30 USD

I have an app, created with React-Native and Expo, that connects to a server via websocket and listens to messages...(more info will be provided to the choosen freelancer for this project)
This app works fine so far and it does what is supposed to do. I built an apk package from it using: "eas build" and was installed in android phone without any issue. However, when the app is working in background, the connection to the server closes. This is normal since no implementation of background task was done for this app.
What I want now is: to implement background task for this app using "react-native-background-task" or any other library of your choice. I want the app to be working in the background (when installed in the android phone).

Key Requirements:
- Use any suitable library (other than react-native-background-task or react-native-background-fetch) to implement background tasks.
- Ensure the app can perform the following in the background:
- Persistently maintain the WebSocket connection
- Listen and respond to incoming messages
- Sync data with the server periodically.

- The background task should be triggered at regular intervals.

Please only apply if you have significant experience with Expo and implementing background tasks.