incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <>
Subject Re: [Android] MediaScanner branch
Date Wed, 20 Jun 2012 21:43:00 GMT
So I've pushed further updates to the media scanner branch.

Works on both ICS and Gingerbread. Two issues though:

- pictures NOT saved to the photo album can't have the exif headers
re-written to them. For some reason the Android exif helper can't get a
reference to the file (which is in the app jail).
- pictures NOT saved to the photo album leave a empty (blank) image in the
gallery. WtfŠ

I tried your approach too, Simon, both report back that it failed to
delete the image. That said, the image in the gallery is blank..

So, I'm not sure. Is this good enough? In terms of a _visible_ image in
the gallery, we can now control whether an image is shown in the gallery
or not. The blank/empty image in the gallery is really weird though.

Definitely would like input on this from the group before/if I merge it in.

On 6/20/12 1:37 PM, "Filip Maj" <> wrote:

>I got a bit farther. I save the final scaled image to the jail path (I.e.
>"/data/data/") but when I remove the originally-taken
>image returned from the camera app, I still see an entry in the gallery
>app. Interestingly, the entry is completely black and the gallery app
>can't load it. Huh.
>That said I've just used the File class to delete it, not the
>content-resolver-based delete. I'll try that, thanks Simon!
>Also now dealing with having the exif headers re-written back to the
>jail-based image file. Apparently the exif helper class can't resolve
>absolute paths. Simon do you know if the exif helper class assumes a
>content: URI?
>On 6/20/12 11:49 AM, "Simon MacDonald" <> wrote:
>>Hey Fil,
>>Try doing this:
>>        *int* result = *this*.cordova
>>            MediaStore.Images.Media.*DATA* + " = ?",
>>            *new* String[] { filePath });
>>that should delete the image at filePath from the content store. I don't
>>think it deletes the file but you should be able to see that after a
>>Simon Mac Donald
>>On Wed, Jun 20, 2012 at 1:32 PM, Filip Maj <> wrote:
>>> Just an FYI for the Android folks on the list.
>>> hortlog;h=refs/heads/mediascanner
>>> I pushed this branch up to the repo as I am working on the
>>> "saveToPhotoAlbum" option for the camera API. Allows the user to
>>> if pictures taken should show up in the Gallery application on the
>>> Some phones (Galaxy Nexus, my theory is in general ICS phones) don't
>>> taken pictures in the Gallery immediately after taking them, if the
>>> picture is saved to external memory. If you reboot the device or
>>> mount/unmount the SD card, it shows up.
>>> The above branch manually triggers Android's MediaScanner service so
>>> it shows up in the Gallery immediately.
>>> Next I will work on _hiding_ taken pictures from the Gallery.

View raw message