API for running background tasks. Could be scheduled, run on an interval or event driven.
Cool. So you need to update this:
as it says:
"Expo apps don't support background code execution (running code when the app is not foregrounded or the device is sleeping). This means you cannot use background geolocation, play audio in the background, handle push notifications in the background, and more. This is a work in progress."
@Limoncello: play audio in the background & handle push notifications in the background is still not available.
@Rajendran Nadar: Thank you for clarification. Is the handling of push notifications in the background planned?
@Limoncello: Not yet but the background audio is in progress.
@Rajendran Nadar: Is there document describing what is and is not possible?
Does anyone have an example repo / snack for this addition?
@Brent Vatne since background fetch for android hasn't been completed should a new feature request be created in order to make this a priority in your backlog?
@Colin Krist: sure, sounds good
@everyone I've created a canny request to vote on for this https://expo.canny.io/feature-requests/p/android-background-fetch-support
Thanks for the great work guys. I can see this feature is complete. Waited a long time for it. However in the docs it talks only about IOS. Does TaskManager work on Android?
now supported for location and fetch, see https://docs.expo.io/versions/v32.0.0/sdk/task-manager - please open follow up requests for other specific use cases :)
Looks like the PR mentioned is merged https://github.com/expo/expo/pull/2338. Kudos to the team behind this effort.
It would be great to be able to fire an alarm that wakes the device.
one year later ...
I need that shit! xD
Hey i need this badly in our project. It would be more helpful if you guys can give some information on expected date of release for this.
Need this badly!! Please don’t make us eject our app from Expo just to get this.
Anyone checked this ??? https://medium.com/@inkdrop/a-simple-way-to-run-js-in-background-thread-on-react-native-8fff345576da
Great!! Waiting for it !!
Finally!!! Nice code and let us know about the progress! 👏🏼👏🏼
🔥💙 Getting closer 🤞😁💣
Yes this is still planned, you can track the PR here: https://github.com/expo/expo/pull/2338
@Evan Bacon: thank you.
@Evan Bacon: Superb SDK 31 is very close!
@Evan Bacon: Shouldn't this task be marked as In Progress then? Thanks for all your work!
@Rajendran Nadar: SDK v31.0.0 has been released, but the backgrounding (at least for Audio) is still not supported yet :(
@Pavlo: correct, I probably should have specified. This one needed a while to complete. Hoping for 32 or 33. We'll have a shorter cycle for 32 to get back on schedule, so it may be a v33 thing 😅😓
@Evan Bacon: please v32 😆👍 Keep up the good work folks!
@Evan Bacon: Great thanks! Looking forward to that :)
@Evan Bacon: Hey Evan, when can we expect the v33 to be released? Is there an approximate date? Thanks!
Super important feature and still missing!
This feature still in plan ?
A year later and this is still missing!
The most important missing feature
This is the most important feature missing at the moment.
On the need of that too!
It would be awesome to provide rough estimate on release date. I mean are we talking 2 weeks | 2 months | 6 months | a year? Thank you!
@Jaromír Navara: They are working on it until and unless the dependencies are not resolved this feature won't work!
Can someone tell the tentative details of when can this functionality be made available?
This would be great! I have spent the last few days trying to do this but I don't really want to eject
Any news on this guys from Expo who is very great? this is very crucial for locator apps and a deal breaker.
Unfortunately, I have to leave Expo without this feature. I think I have a few weeks to go before I'll have to stop using Expo.
i got rid of expo just for this and now in rabbit hole with android and firebase!
@Mohammad H: hey!! I'm just curious to know whether any other things worked out for you? Coz I'm too stuck with the same combination as you are: Expo Android & Firebase. Is there any other substitute for this? have you worked it out in any other manner other than NPM plugins ?
Didn't realize how big of a problem this is until we started comparing our app in Android vs iOS. iOS kills any executing code when the app is sent to the background. Sucks when a user takes a picture that is sent to our servers but they move on to another app after doing so. 😢
I love to use this feature
Please need this - many people won't use expo as this is a needed feature for most apps
+ 1, cannot wait for this feature!
You could always just use this: https://github.com/jamesisaac/react-native-background-task
@Clayton Barnard: You would have to Eject from expo to use that.
It doesn't work in ExpoKit either
@Jarod Hanko: Do you know anything like this that will work with ExpoKit?
This is a "must" for my app
Yesss, please! That would be a major step forward for Expo!
+ 1 for this one - this would be really helpful
I know you guys don't have timelines, but is it possible to roughly estimate when this feature can go to 'In Progress' state? This feature is crucial for my application and at this point I need to either eject or know how much roughly I need to wait. Thank you 🙌
Is this the same thing as being able to create a music player app that continues to run in the background?
Im a little bit confused on this. Does it mean that if an expo app on a user's phone is closed, and someone sends a notification to him, it wont appear on the phone?
@JUAN CARLOS CANCELA: no: push notifications are displayed like you would expect
@Sébastien Lorber: Did you mean to put a comma after the "no"?
@Sergiu Gabura: yes I edited my answer
@JUAN CARLOS CANCELA: thankfully this is the one thing that works. we are able to notify the user they will have to re-auth at the end of each day if they do not open the app again soon, but not send an api call to cycle the auth token. this is still quite frustrating for the user.
we'd love to allow them to set a pin and have it run oAuth token cycling, transparent to the user. then they would only get nagged if they don't set a pin AND don't disable the notice.
edit: setTimeout() seemed to work as expected on Android devices for hourly code execution (ie: is the cached expiry time soon?), but this failed on iOS. also it didn't seem to be able to update the data in the background even if we could check it.
@Jeremy Bradbury: Thanks for replay, good to know!
I really really really need this like... yesterday :/ any release date for this?
There are a few react-native packages that support this but you have to detach your app :( +1
This function is very important to me!!!
In vanilla RN there's background JS for android. Is it even possible for iOS?
I'm surprised this doesn't already exist. Seems like a core part of building a mobile app.
@Josh Close: I've heard infrastructure for this is currently being worked on, as it's needed for other features like background location tracking etc
Yes! This is EXACTLY what I need!