Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/234.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 通过Intent.ACTION\u视图打开时禁用读卡器应用程序上的缓存_Android_Caching_Android Intent - Fatal编程技术网

Android 通过Intent.ACTION\u视图打开时禁用读卡器应用程序上的缓存

Android 通过Intent.ACTION\u视图打开时禁用读卡器应用程序上的缓存,android,caching,android-intent,Android,Caching,Android Intent,我需要使用android默认视图intent(intent.ACTION\u视图)打开一些阅读器应用程序的应用程序私有文件(pdf、txt等) 但我不需要将文件缓存到读卡器应用程序中。有没有办法做到这一点?或者我是否需要在我的应用程序中集成阅读器库以防止这些缓存。您可能需要阅读此文章,谢谢您的回复。所以最好的方法是在我的应用程序中显示文件?让我知道你对此的想法。@Raghunandanyup我想是的。我以前没有这样做过。看起来这是一条路。一般来说,没有办法强迫任何由intent启动的应用程序做任

我需要使用android默认视图intent(intent.ACTION\u视图)打开一些阅读器应用程序的应用程序私有文件(pdf、txt等)


但我不需要将文件缓存到读卡器应用程序中。有没有办法做到这一点?或者我是否需要在我的应用程序中集成阅读器库以防止这些缓存。

您可能需要阅读此文章,谢谢您的回复。所以最好的方法是在我的应用程序中显示文件?让我知道你对此的想法。@Raghunandanyup我想是的。我以前没有这样做过。看起来这是一条路。一般来说,没有办法强迫任何由intent启动的应用程序做任何事情。如果你担心安全问题,假设最坏的情况是,你启动的任何应用程序的第一件事就是将其发布到facebook上。
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setDataAndType(uri, "application/*");
    startActivity(intent);