我怎样才能刷新库后,我在android的插入图片? [英] How can I refresh the Gallery after I inserted an Image in android?
问题描述
我添加使用的Android API如下的插入图片:
I've added an inserted in Gallery using android API as following:
Images.Media.insertImage(ctx.getContentResolver(), SCARD / test.jpg放在,你好, 说明);
Images.Media.insertImage(ctx.getContentResolver(), "scard/test.jpg", "Hello" , "description");
其实,我通过它的完整路径(SCARD / test.jpg放在)的图像已经成功插入数据库,但是当你打开图库你看不到它,除非你关闭/设备或安装在/卸载外部存储器。
Actually the image that I passed its full path (scard/test.jpg) is already successfully inserted in the DB, but when you open the gallery you can't see it unless you switch off/on the device or Mount/Unmount the external memory.
这有什么办法来刷新需求画廊?
It there any way to refresh the gallery on demand?
感谢
贝塞尔的Kh。
推荐答案
您必须运行介质扫描仪。 这可能的帮助。
You have to run a Media Scanner. This might help.
这篇关于我怎样才能刷新库后,我在android的插入图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!