On Mon, Nov 28, 2011 at 11:42 AM, saex <[email protected]> wrote:
> Official facebook App haves a bug, when you try to share a image with > share intent, the image gets deleted from the sdcard. This is the way > you have to pass the image to facebook app using the uri of the image: > > Is this a documented bug? Have you reported it? Or is it just the way it's designed, and not a bug but just a difference in the way you word things? > File myFile= new File(Environment.getExternalStorageDirectory(), > "car.jpg"); > Uri uri = Uri.fromFile(myFile); > i.putExtra(Intent.EXTRA_STREAM, uri); > > Then, i supose that if i create a copy from the original myFile > object, and i pass the uri of the copy to facebook app, then, my > original image will not be deleted. > > Please, can someone tell me how to do a exact copy of a file? > > Thanks It sounds like you *do* want a new file. Copy the file, right, into something like car_copy.jpg, and pass that. You can copy the file using the link example Mark provided. (Even if you don't *have* an InputStream, you can get one easily enough.) kris -- 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

