Editing Android Manifest


#1

Is there still no way to edit the Android manifest inside an expo project?

I’m trying to use
this.watchID = navigator.geolocation.watchPosition()

To continually get the users location, and I need to edit the Android manifest to:

Any way to get around this without detaching?

Thanks!
Jackson


#2

You can’t edit the manifest without ejecting but you don’t need to in general.

Here are the docs for doing location stuff in Expo.

https://docs.expo.io/versions/v18.0.0/sdk/location.html#expolocationwatchpositionasyncoptions-callback

There isn’t a way to do background location yet in Expo but we’re working on it. In the meantime you need to eject if you need that.


#3

I’ll give that a shot! Thanks @ccheever


#5

Ah, I figured it out. Bug on my side.

I wasn’t calling the API correctly. getCurrentPosition returns a promise, watchPositionAsync uses a callback. I was using promises on both.

Thanks for you help!