WayspotAnchorService LocalizationState always return Failed

  • Device type & OS version: Android
  • Host machine & OS version: Windows
  • Issue Environment : On Device
  • Xcode version:
  • ARDK version:
  • **Unity version2020.3.19f1:

Description of the issue: When executing the app via Unity and Vitual Studio, the LocatizationState always return Localized, but when i execute the app apk on device the LocalizationState always return Failed. Screenshot of the AndroidManifest:

EDIT: The FailureReason of the method LocalizationStatusUpdated returned NotSupportedAtLocation on a device and Timeout on another device.

Hello Alefe,

Since you’re able to build your project, the Manifest shouldn’t be an issue. Can you share the code you’ve written to set up and run VPS?

I think these are the most important functions i’m using:

 private void OnEnable()
        ARSessionFactory.SessionInitialized += HandleSessionInitialized;
   private void OnDisable()
        ARSessionFactory.SessionInitialized -= HandleSessionInitialized;
 private void HandleSessionInitialized(AnyARSessionInitializedArgs anyARSessionInitializedArgs)
        _statusLog.text = "Running Session...";
        _arSession = anyARSessionInitializedArgs.Session;
        _arSession.Ran += HandleSessionRan;
   private void HandleSessionRan(ARSessionRanArgs arSessionRanArgs)
        _arSession.Ran -= HandleSessionRan;
        _wayspotAnchorService = CreateWayspotAnchorService();
        _statusLog.text = "Session Initialized.";
 private WayspotAnchorService CreateWayspotAnchorService()
        var wayspotAnchorsConfiguration = WayspotAnchorsConfigurationFactory.Create();
        var locationService = LocationServiceFactory.Create(_arSession.RuntimeEnvironment);

        //When continuous localization is enabled, VPS will continue to localize to the user’s current surroundings after the initial localization.
        wayspotAnchorsConfiguration.ContinuousLocalizationEnabled = true;

        var wayspotAnchorService = new WayspotAnchorService(_arSession, locationService, wayspotAnchorsConfiguration);

        wayspotAnchorService.LocalizationStateUpdated += LocalizationStateUpdated;

        return wayspotAnchorService;

I have a question: for the location state to have the status of localized, do I need to have a scanned test vps active in my project’s geospatial browser? At least when running on a device, because inside the unity editor the status always return localized.

Hello Alefe,

I see that your code is fairly similar to the sample we have on our documentation. Are you following any other examples? The code looks correct as far as I can tell. I also noticed that you’re using OnDisable and OnEnable. Just want to double check that you’re aware that you’re taking full manual control over the manager. If you have the manager attached as a component to something in the hierarchy, make sure that the “Manage Using Unity Lifecycle” box is unchecked.

Where exactly can i check the “Manage Using Unity Lifecycle” option? Here is a screenshot of my manager:

EDIT: found the “Manage Using Unity Lifecycle” on the Capability Checker script

So what other options could be causing this issue? Could it be that when i test on a mobile device the vps location cant be localized? I only tested on private vps locations

Hey Alefe,

That’s a screenshot of the Session Manager I would need a screenshot of the VPS Manager. If possible can I also know what guides you’re following to get an idea of how you’re setting up VPS