Search code examples
google-project-tango

How to save ADF file to a network share?


So, it looks like the best way to do this is with the exportAreaDefinitionFile() call. I thought I would just export the file to the local file system then manually send it to where I need it. However when I make the exportAreaDefinitionFile() call, I don't get a file in the local file system. When I handle the onActivityResult() for the export it gets a RESULT_CANCELED result every time. Does anyone know why this would occur? Everything I've seen online says it should work.

When I look at logcat I get these messages after the exportAreaDefinitionFile() Call: I/tango_client_api: void TangoService_disconnect(): Disconnecting from Tango...
I/tango_client_api: void TangoService_disconnect(): Successfully disconnected from Tango.

Is this normal?


Solution

  • I figured it out!!

    It turns out that the problem was I was using this:

    String mapsFolder = getFilesDir() + File.separator + "ADFs";
    

    When I should have been using this:

    String mapsFolder = getFilesDir().getAbsolutePath() + File.separator + "ADFs";
    

    This being my first ever Android app I have no idea why these two calls are functionally different. I still haven't wrapped my head around the Android file system.