Background worker


#1

Hi,

I have already given up on React Native due to each feature I wanted was requiring a new package and another link call. I had already five such packages and build was taking very long time and was failing many times. Now I see that you provide most of what I need and looks very promising. It looks like Expo is actually bringing the stability RN needs.
What I still need is having a small background worker task to run even when my app is closed. On Windows it’s called a Windows Service. I know that on Android and iOS these are implemented differently, but would be great if you could provide an abstraction layer over those. Just a simple call like Expo.startBackgroundTask(interval /*or event?*/, callback). And of course, this callback to have access to the Expo API.
Would it be possible? I actually need it to track user movement even if the app is closed. All I need is to be able to fetch user location every 15 minutes with app closed or in background, do some checks and push to Firebase db. It is for a company app to track employees really working on locations, not spying users without permission :slight_smile:
I tried using https://github.com/mauron85/react-native-background-geolocation-example in my RN app but because I had many native components it was really hard to get it all work together because of Google Play Services versions mismatch and all kinds of problems connecting to native platform. (Or maybe I just was not trying hard enough.) I am actually a web developer so I really appreciate Expo abstracting away all these integration to native platforms. Really a great improvement!
Thank you for your help,
Rudy :slight_smile:


#2

Background work is on our roadmap for the near future, but I believe it will take some time to get the API right (cc @ben).

EDIT: Also, thank you so much for the kind words!


#3

It would be very nice to have this feature asap.
Useful for local notifications and other features!

Thx for the work your doing!


#4

Is there any ETA for this feature? I need it for an app that I am building. Any insight on the timeline would be much appreciated. BTW, Really great work on the expo sdk. Thanks!


#5

@joshwils82 sorry but we don’t have an ETA yet. We haven’t lined anyone up to work on it so probably won’t be for a few months at least. Thanks for the kind words! Also if you need background processing now you can always detach.


#6

Thank you for the amazing Expo platform, we are happy to use it for our application. It is amazing that frontend developer as me can start build mobile apps so quickly with you product. We are also looking forward the background location tracking feature, this should be an extremely useful.


#7

I really need this feature too. Expo is awesome!


#8

You can up vote the feature request here: https://expo.canny.io/feature-requests/p/background-location-tracking


#9

@ide Any update on this feature. Last discussion on this thread was in July 17. I hope by now there should be some ETA defined for this feature. Already up voted on Canny.
I am loving Expo, just absence of this feature is killing me, as its must for my app.


#10

We are just starting to explore some background features. This will take awhile because of the new class of complexity and coming up with an API that is responsible with regard to battery life, security, and other things that are important to people using apps made with Expo. So there is no ETA but it is something that we are starting to explore and may include in a future Expo SDK this year.


#11

This topic was automatically closed after 7 days. New replies are no longer allowed.