incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Maj <...@adobe.com>
Subject Re: [Android] MediaScanner branch
Date Wed, 20 Jun 2012 20:37:15 GMT
I got a bit farther. I save the final scaled image to the jail path (I.e.
"/data/data/my.package.name/") 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" <simon.macdonald@gmail.com> wrote:

>Hey Fil,
>
>Try doing this:
>
>        *int* result = *this*.cordova
>.getActivity().getContentResolver().delete(MediaStore.Images.Media.*
>EXTERNAL_CONTENT_URI*,
>
>            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 quick
>test.
>
>Simon Mac Donald
>http://hi.im/simonmacdonald
>
>
>On Wed, Jun 20, 2012 at 1:32 PM, Filip Maj <fil@adobe.com> wrote:
>
>> Just an FYI for the Android folks on the list.
>>
>> 
>>https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a
>>=s
>> 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 specify
>> if pictures taken should show up in the Gallery application on the
>>phone.
>>
>> Some phones (Galaxy Nexus, my theory is in general ICS phones) don't
>>show
>> 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
>>that
>> it shows up in the Gallery immediately.
>>
>> Next I will work on _hiding_ taken pictures from the Gallery.
>>
>>


Mime
View raw message