Hello,
looking at your code, I could not find anything regarding the location permissions required. Are you asking for Android.Manifest.Permission.AccessFineLocation and Android.Manifest.Permission.AccessCoarseLocation?
In any case, I would recommend just calling ArchitectView.setLocation with hard-coded parameters and checking whether that causes onLocationChanged to be called. That way, errors that might be in the Xamarin location access code can be ruled out.
- Daniel
Small amendment:
calling
architectView.SetLocation(1.0, 2.0, 3.0);
in
protected override void OnResume
of the WikitudeActivity works for me using the sample world you mentioned. I do get onLocationChanged called with the supplied values.
- Daniel
I think you would just need to add more permissions to the one that is already requested in MainActivity.cs, like so:
ArchitectView.PermissionManager.CheckPermissions(this, new String[] { Android.Manifest.Permission.Camera, Android.Manifest.Permission.AccessCoarseLocation, Android.Manifest.Permission.AccessFineLocation }, PermissionManager.WikitudePermissionRequest, this);
I believe iOS will take care of getting the location internally, if I am not mistaken. No need to do anything other than making sure the permissions are in order.
- Daniel
Sergio Serrano Hernández
I have a problem with the location, I tried it in the browser and it works when I put the latitude and the longitude, but in the phone it does not recognize the location.
The location, the internet, the permissions, everything is activated and it does not work for me with the examples that give "08_PointOfInterest_4_SelectingPois" (I'm using Xamarin sdk 7.1.0) I execute it and I get the message of always "Trying to find out where you are "uh tried everything but there is no way, it seems to me that the method is not being called" AR.context.onLocationChanged = World.locationChanged; " and I have less than a month to present the project to see if it is invested in the purchase of your license.
Any help is of great value.