mapbox-unity-sdk
mapbox-unity-sdk copied to clipboard
The built app in Android doesn't open my camera and the map is fixed
Note: If this is a bug or support ticket, please provide the following information:
- Unity version: 2019.3.13f1
- Scripting Runtime Version: (API Compatibility Level) .NET Standard 2.0
- Scripting Backend: Mono
- Api Compatibility Level: .NET Standard 2.0
- Mapbox SDK version: 2.1.1
- The platform you're building to: Android
- A description of what you're trying to do: I'm trying to build an app that shows some augmented 3d objects in fixed gps coordinates
- Steps to recreate the bug if appropriate:
- I create a new unity project
- I import the mapbox sdk
- I swith platform to android (in that point i get an error saying SpatialTracking doenst exist) so I install the ARCore XR Plugin through the package manager.
- Then I open the scene WorldScaleAR, I add the layers ARGameObject,Map,Path,Both
- I set lat and long in LocationProvider>Editor>lat long.
- In ArAlignedMap, I set the lat & long in "General" and the objects in Map Layers>Points of Interest
In the Game Mode I see this, and I can move it with the right click:

But when I install the app in my Android (samsung s7 edge android 8.0 and ARCore version: 1.18.200603036) It doesn't open the camera, I mean I can't see my environment, I only see the blue backround with the orange buildings and fixed, if I move the phone or I swipe in the screen, nothing happens.
In the Log section I get "GPS update ignored due to bad accuracy 64>5.0"
The app is detecting the gps position of my phone because I can see the object but what i see is a fixed screen like the picture above but without the possiblity to move it.
There's anything I can do to fix it? thanks a lot in advanced!!
Hi @FranciscoSola, I am facing the same issue here, are you able to resolve with any solution? Would you mind to share? Thanks!
When I first opened the App on Android, it didn't ask me permission for the Camera, just for the Location. I granted camera permission via Settings in Android and it fixed it.
And for the GPS Accuracy, I don't think you can get sub 5m with just an smartphone without any SBAS or MTRIP antenna. You can edit the limit value in the script SimpleAutomaticSynchronizationContextBehaviour.cs line 35
const float _minimumDesiredAccuracy = 20f;
This sounds more like an AR/App issue more than map I guess? I'm really not experienced in AR at all but if I remember correct, there was some settings for camera usage etc. in project settings right? Do you think that might be the issue? Looks like app simply doesn't know it's expected to use device for camera position.