这是一个问题,但我没有解决它使用该解决方案。 这里是我的代码排除谷歌驱动器选项浏览文件通过意图在Android
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
Uri uri = Uri.parse(Environment.getDownloadCacheDirectory().getPath().toString());
intent.setDataAndType(uri,"*/*");
intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
intent.addCategory(Intent.CATEGORY_OPENABLE);
try {
startActivityForResult(Intent.createChooser(intent, "SELECT FILE"), commonUtilities.FILE_REQUEST_CODE);
} catch (ActivityNotFoundException e) {
}
仍然谷歌驱动器选项在那里。我只是不想显示谷歌驱动器选项。
我怎样才能得到那个帮助我。在此感谢
'Intent.EXTRA_LOCAL_ONLY'该怎么办? – greenapps
哪种解决方案?如果你引用了simething,请提供一个链接。 – greenapps
我使用'intent.putExtra(Intent.EXTRA_LOCAL_ONLY,true);'从[https://stackoverflow.com/questions/34310167/how-to-restrict-google-drive-option-from-not-appearing-while-选择文件或我]没有工作 – manjari