Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[ios][android][sdk][ncl] background location, geofencing and background fetch #2338
The core of this PR is to implement TaskManager that provides an API to manage tasks, especially these that run while the app is in the background. I hope I documented this piece enough so I don't have to write it here again
This PR also adds three ways of how we can use background tasks:
Also, to improve the quality of
All new modules and
New APIs examples in
There are also some quick tests in
I can't promise geofencing will be a part of SDK31 but we're doing our best to make it happen
esamelson left a comment
Whew, there is a lot of code here!
One question -- how are we handling Always vs When In Use permissions on iOS?
ide left a comment
There's a lot to review here and it will take awhile. I haven't looked at the module implementations yet. The TypeScript support needs to be consolidated with a central configuration so that all of the modules are built in a consistent way -- we are starting to work on this.
This was referenced
Nov 13, 2018
Dec 13, 2018
I also wanted to post a link to the docs associated with this pull request (as the link provided in the description is to the private repo): expo/expo-docs@9ef7842
@esamelson you're definitely right that this isn't the place for feature requests. The issue though, is that there's one big issue for all the things people are asking about and there's not really any updates there as far as what exactly is being worked on. This is mentioned as the relevant PR for that feature request. As awesome as this PR is, it only covers a subset of background tasks.
Rather than trying to field all the questions here, can anyone give the many watchers of this issue an idea of how future/current plans might be communicated to the community?
The real issue causing questions here is that although the request on Canny is marked "In Progress" it's not entirely clear what sort of background task support is actually In Progress or even planned down the road. Can we expect a more general background task capability in the future?
@Slapbox -- thanks for the clarification. "Background tasks support" can mean completely different things in terms of the implementation, depending on the use case. As of writing this, we have no concrete plans to add background task capabilities beyond this PR to the Expo SDK.
To answer your question about current & future plans, all our client-side work is now in this open-source repo, so watching the open PRs is the best way to understand our short-term plans / current work. Regarding longer-term plans, we try to communicate those on our blog when appropriate.
We are shifting our focus away from developing new modules and towards improving the ExpoKit experience and our infrastructure so that we can better empower developers to add features they need themselves. The maintenance cost for our existing modules is already quite high; further, it's virtually impossible to cover 100% of use cases with any limited set of native modules, and it's unsustainable to have our small team as a feature bottleneck.
So at this time, I would say no, you should not expect a more general background task capability in a future Expo SDK; however, you can expect an improved ExpoKit and infrastructure to which you can more easily add whatever capabilities you need, if they are not fulfilled by this PR or other Expo SDK modules.
I hope this makes sense and clarifies things a bit!
Sounds great. From my perspective that is actually the only major item missing from expo that was preventing it's use in some important business scenarios. Thank you for covering that!
Also, NFC is missing. After that, I'll be the happiest dev in the world! Good job guys!
I'll let myself lock this conversation as this pull request has been merged and is already undergoing QA and awaiting release. I think this whole thread, thanks to @tsapeta's and @esamelson's explanations, will still be a valid source of information about this feature.
For casual questions, please head over to Expo's Slack (https://slack.expo.io/).
We're really excited about this and all other features too!
When it comes to NFC support, as all feature requests it lives at expo.canny.io (https://expo.canny.io/feature-requests/p/nfc-support) and this will be the best source of information whether it's planned, in progress or resolved.