我的代码下载apk到SD卡,这是工作在模拟器和安卓设备有SD卡。我正在为android stick开发应用程序,它有Nand Flash /内部闪存而不是SD card.How我可以得到Nand flash的路径下载forlder..How我可以在NandFlash中找到下载文件夹的路径吗?
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(new File("/internalmemory/Download/newversion.apk")), "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // without /mnt/sdcard this flag android returned a intent error!
context.startActivity(intent);
发布于 2013-06-20 23:26:44
如何在NandFlash中找到下载文件夹的路径?
就像你希望在其他地方找到“下载文件夹的路径”一样:
Environment.getExternalStoragePublicStorageDirectory(Environment.DIRECTORY_DOWNLOADS)`
您可以在the documentation中阅读有关getExternalStoragePublicDirectory()
的更多信息。您还可以考虑阅读有关external storage的更一般的文档。
https://stackoverflow.com/questions/17217544
复制相似问题