开发者

Hide images from gallery - Show only in own application?

How do I take pictures with the camera and ensure that the taken pictures are only visible from within my own application. ie I don't want the pictures to appear in the gallery app?

EDIT: Can someone show some code on how to set this path such that when the pi开发者_JAVA百科cture is taken and the user presses save in the camera app, it saves to getFilesDir path ?


How do I take pictures with the camera and ensure that the taken pictures are only visible from within my own application.

Don't store them someplace that is indexed by the MediaScanner. That could be in your application-local file store (e.g., getFilesDir()), or on external storage in a directory that has a .nomedia file.

I have tried storing image as blob in sqlite db, but the image still appears in the gallery

Either you did not store the "image as blob in sqlite db", or the images also existed in the file system somewhere. I am very confident that an "image as blob in sqlite db" did not get indexed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜