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

こ雲淡風輕ζ 提交于 2019-12-11 09:36:23

问题


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


回答1:


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);



回答2:


Check permissions of the demo apps with the classes that you're trying to access. And if not that, just show me some code so that the community can help you figure out your problem. Because as of right now that's all I can think of.



来源:https://stackoverflow.com/questions/26791371/java-lang-securityexception-tango-permission-denied-no-adf-permission

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!