Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个应用程序来查找和删除保存在 Android 设备上的视频、照片等媒体文件。我想我应该走 Intents 的路,但我不确定这种方法。
谁能告诉我如何实现这一目标?
谢谢。
尝试使用流行的媒体格式(如 mpg、avi、3gp、jpg 等)搜索文件。
使用 f.getName().endsWith(".3gp") //对于 3gp,其中 f 是文件对象。
使用 f.delete() 删除这些文件。