Search code examples
javaandroidgoogle-project-tango

java.lang.SecurityException: Tango Permission Denied. No ADF permission


I've been trying to make sense out of ADF data by exporting it from the demo apps. However, when I try to perform the export it complains about no having ADF permissions. I'm calling the export routine right after REQUEST_TANGO_PERMISSION but I'm still unable to read the ADFs.

I went to the online docs but I wasn't able to find the name of this permission request intent. Does anybody know how to request this? Since it is intent based I'm assuming it should be requested in the same way that the main REQUEST_TANGO_PERMISSION.

Thanks for your help

Cristhopper


Solution

  • You should call a intent to export/import the adfs, the intent you called need to specify the target location or ADF's uuid. Please take a look of the doc here (import/export section)

    private static final String INTENT_CLASSPACKAGE = "com.projecttango.tango";
    private static final String INTENT_IMPORTEXPORT_CLASSNAME = "com.google.atap.tango.RequestImportExportActivity";
    // startActivityForResult requires a code number.
    private static final String EXTRA_KEY_SOURCEUUID = "SOURCE_UUID";
    private static final String EXTRA_KEY_DESTINATIONFILE = "DESTINATION_FILE";
    Intent exportIntent = new Intent();
    exportIntent.setClassName(INTENT_CLASSPACKAGE, INTENT_IMPORTEXPORT_CLASSNAME);
    exportIntent.putExtra(EXTRA_KEY_SOURCEUUID, mUUIDList[info.position]);
    exportIntent.putExtra(EXTRA_KEY_DESTINATIONFILE, mAppSpaceADFFolder);
    thisActivity.startActivityForResult(exportIntent, Tango.TANGO_INTENT_ACTIVITYCODE);