我怎样才能刷新库后,我在android的插入图片?我在、插入图片、android

2023-09-13 23:49:01 作者:残留的温柔

我添加使用的Andr​​oid 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.