Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Location Service problem with ARCore #14

Closed
dblatner opened this issue Sep 10, 2017 · 7 comments
Closed

Location Service problem with ARCore #14

dblatner opened this issue Sep 10, 2017 · 7 comments

Comments

@dblatner
Copy link

ARCore seems to combine a lot of sensor data for the positioning / motion tracking of the device.

However, if I want to access the GPS data through the LocationService it gives me the status disabled for LocationService and any access on the latitude/longitude does not return any plausible values.

Does anyone know why this is happening? How can I access the coordinates of the LocationService?

@nathanmartz
Copy link

Thanks for the bug report. We're looking into this and will get back to you when we have more info.

@chaosemer
Copy link
Contributor

@dblatner could you provide a repro project where you expect Unity's LocationService to work but it is not working? That will help us immensely in tracking this down.

@dblatner
Copy link
Author

dblatner commented Sep 11, 2017

Hello @chaosemer, @nathanmartz,

I uploaded an example ARCore Unity project : https://github.com/dblatner/unity-arcore-locationservice

It's basically the HelloAR example, then I included two scripts. One for getting the geolocation and one for displaying it on the canvas.

I checked the problem with the Samsung S8 phone. I double-checked the location settings on the phone but the problem persists.

Please let me know, if the problem occurs on your phone too or not.

Best regards

@chaosemer
Copy link
Contributor

The issue is that once you enable ARCore, Android Permissions are no longer requested automatically, and you do not have the location permission.

You can request the location permission at runtime with AndroidPermissionsManager.RequestPermission(), passing "android.permission.ACCESS_FINE_LOCATION".

I hope this helps! If so, please feel free to close this issue.

@chaosemer
Copy link
Contributor

I'm assuming your issue is fixed due to the lack of responses. Please reopen if you're still having an issue.

@ashanhol
Copy link

Hello! I was running into this myself and wanted to add a note since this was the only visible thread for this problem.

If you have to chain multiple permissions, I found I needed to add WaitForCompletion() in order to make both requests pop up.
Example:

var firstPermission = AndroidPermissionsManager.RequestPermission("android.permission.ACCESS_FINE_LOCATION");
firstPermission.WaitForCompletion();
var secondPermission = AndroidPermissionsManager.RequestPermission("android.permission.CAMERA");
secondPermission.WaitForCompletion();

@tpaslou
Copy link

tpaslou commented Sep 13, 2019

I faced the same problem . I have an S10 and using ARCore v1.11 . Although , the problem appears only on the editor and instant preview . On runtime i get GPS data .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants