Thanks Anton.

It sounds like too much extra work for so simple and basic operation.
But, I guess this is only approach which would work for android.
Slightly disappointing though...
__
Alex


On Feb 19, 4:23 am, Streets Of Boston <[email protected]> wrote:
> No. You have to do this all yourself :(
>
> 1. Query from the mediastore all the info for your originalimage,
> including its file-path (DATA column).
> 2. Query from the thumbnail mediastore the info of all the thumbnails
> (can have more than one) for the givenimage.
>
> 3.Copyyourimage-file to another location. Remember this location
> for the new DATA column of your newimage.
>
> 4. Insert into the mediastore all the data obtained from point (1.)
> but set your DATA to the new file-path of your newimage(from point
> 3.).
> 5. Insert into the thumbnail mediastore the thumbnails of this newimage. Use 
> the data from point (2.), but update the IMAGE_ID with the
> newimage-id from point (4.) and make also copies of each thumbnail
> file (DATA column).
>
> On Feb 17, 9:19 pm, benderillo <[email protected]> wrote:
>
>
>
> > Hi everybody,
>
> > Here is the problem:
> > I'm trying to figure out the bestwaytocopyexisitng jpegimageon
> > SD card from one folder to another with MediaStore database properly
> > updated.
>
> > First approach I tried:
> > 1) Open IN and OUT streams; 2)Copyfile to a new location as byte
> > stream; 3) Use MediaScannerConnection.scanFile() to update MediaStore
> > DB.
> > Thiswayworks fine except one problem:imagethumbnail is not
> > generated (MediaStore.Images.Thumbnails is empty). I looked inside
> > "scanFile" method; it doesn't seem to have any code for thumbnail
> > generation.
>
> > Second approach:
> > Try to use Images.Media.insertImage() - with this approach I don't
> > know how to chose the physical location of the new file. You can't
> > control this. You just get an Uri to acopyof theimagewhich is
> > copied (re-encoded) to some place but not the folder you need it to be
> > in.
>
> > In other words, my question is: Isthereanywayto give MediaStore an
> >imagefile and say "Please, take this file and fill up your database
> > with all the information it should have, including thumbnail"?- Hide quoted 
> > text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to