title: Project Tango: Export ADF to sdcard
body: <p>I'm trying to export an ADF from project tango to the sdcard use the code sample from the docs and its failing for me. I'm able to get the export dialog to pop-up successfully with the proper export path. However when I hit the export button, I get a failure in log</p>
  
  <pre><code>12-16 00:48:12.203      192-603/? E/tango_service_library_context﹕ bool RuntimeExportAreaDescription(const string&amp;, const string&amp;, const string&amp;): Internal error occured opening file: /storage/emulated/0/c5617dae-01b0-4825-8ee1-777c17693414
  12-16 00:48:12.209    8246-8246/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
  Process: com.projecttango.tango, PID: 8246
  com.google.atap.tangoservice.TangoInvalidException
          at com.google.atap.tango.TangoInternal.throwTangoExceptionIfNeeded(TangoInternal.java:118)
          at com.google.atap.tango.TangoInternal.exportAreaDescriptionFile(TangoInternal.java:104)
          at com.google.atap.tango.RequestImportExportActivity.onExportAccepted(RequestImportExportActivity.java:83)
          at com.google.atap.tango.RequestImportExportDialog$1.onClick(RequestImportExportDialog.java:108)
          at android.view.View.performClick(View.java:4438)
          at android.view.View$PerformClick.run(View.java:18422)
          at android.os.Handler.handleCallback(Handler.java:733)
          at android.os.Handler.dispatchMessage(Handler.java:95)
          at android.os.Looper.loop(Looper.java:136)
          at android.app.ActivityThread.main(ActivityThread.java:5030)
          at java.lang.reflect.Method.invoke(Native Method)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)﻿
  </code></pre>
  
  <p>My app has read/write access to external storage which I verified by writing a file with the same path which worked fine.</p>
  
  <pre><code>&lt;uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"&gt;&lt;/uses-permission&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"&gt;&lt;/uses-permission&gt;
  </code></pre>
  
  <p>This is my export code (which is taken from the tango docs):</p>
  
  <pre><code>        adfToExport = GetAdfs().get(0);
  
          String externalStorageDirectory = Environment.getExternalStorageDirectory().toString();
  
          /* this was just a test to verify the app can write to the path
          try {
              String path = externalStorageDirectory + "/c5617dae-01b0-4825-8ee1-777c17693414";
              File file = new File(path);
              FileOutputStream fOut = new FileOutputStream(file);
              OutputStreamWriter myOutWriter = new OutputStreamWriter(fOut);
              myOutWriter.append("testing 1 2 3");
              myOutWriter.close();
              fOut.close();
          } catch (Exception ex) {
              Log.e(LOG_TAG, "failed to write file: " + path, ex);
          }
          */
  
          Intent exportIntent = new Intent();
          exportIntent.setClassName(INTENT_CLASSPACKAGE, INTENT_IMPORTEXPORT_CLASSNAME);
          exportIntent.putExtra(EXTRA_KEY_SOURCEUUID, adfToExport);
          exportIntent.putExtra(EXTRA_KEY_DESTINATIONFILE, externalStorageDirectory);
          startActivityForResult(exportIntent, Tango.TANGO_INTENT_ACTIVITYCODE);
  </code></pre>