Search code examples
google-project-tango

How to load an ADF mid-app while Tango is running? (How to restart tango service)


I'm trying to load an ADF while the Tango is running. So, I call InitProviders with the UDI of the ADF I want. And although the call seems to work, there's no real way to tell if it did--the Tango's pose doesn't seem to change which leads me to believe it's not updating the Tango. Do I have to restart the Tango service? And if so--how?


Solution

  • I'm not sure if there's a way to change the ADF on the fly using the C API. But the only way that I found to that in Unity is restarting the service, as well. To do that you have to call the method Shutdown() of the instance of TangoApplication. And start the services again.