skip to Main Content

I need sheduled track play in my react native app.If sheduled time app is kill , how to play track that time?

I tried React-native-background task and react native fetch libararies but not work properly when app is killed

2

Answers


  1. I don’t know exactly your case, maybe play music. I suggest you play music in service and startForegroundService keep service running when app kill like notification.
    Here document: https://developer.android.com/guide/components/foreground-services.

    Login or Signup to reply.
  2. Try to use the following libraries for running tasks in the background:

    1. react-native-background-job
    2. react-native-background-task
    3. react-native-background-fetch
    4. Headless JS (only available for Android)

    You can try with Headless JS if the above libraries are not working.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search