If u wanna delete the file once the Target activity is over, u can do that in ur onActivityResult(). but i wont guarantee that this will always work bec, if the activity internally triggers a service n dies then u'll have a problem deleting it... if u r mainitaining the status of the file(sent or yet to be sent), then u could have a thread that deletes all files that have been sent... but this is jus a suggestion, there're millions of other ways to do it...
On Fri, Jun 26, 2009 at 11:06 AM, n179911 <n179...@gmail.com> wrote: > > Thank you. > > But if I write the image to a file, and invoke an Intent ACTION_SEND, > passing that image to the intent. > > When/how can I delete the file? I can't rely on the ACTION_SEND > removes that file for me, since it does not know I wrote the Bitmap to > a temp file before I invoke the ACTION_SEND. > > Thank you for any more tip. > > > On Thu, Jun 25, 2009 at 10:24 PM, Sujay Krishna > Suresh<sujay.coold...@gmail.com> wrote: > > If u need the image, u definitely have to write it to a file... Use the > > Images.EXTERNAL_CONTENT_URI.buildUpon() to build a new uri for ur image & > > then use getcontentresolver.openoutputstream to get the outputstream for > the > > uri, & write the image content to the outputstream... now u hv persisted > ur > > image n also hv a uri associated to it... > > > > On Fri, Jun 26, 2009 at 5:48 AM, hap 497 <hap...@gmail.com> wrote: > >> > >> HI, > >> From the JavaDoc, the EXTRA_STREAM parameter when launching an intent > >> needs to be an URI. > >> How can I pass a Bitmap object which I get from launching a > >> "android.provider.MediaStore.ACTION_IMAGE_CAPTURE" intent? > >> > >> /** > >> * A content: URI holding a stream of data associated with the > Intent, > >> * used with {...@link #ACTION_SEND} to supply the data being sent. > >> */ > >> public static final String EXTRA_STREAM = > >> "android.intent.extra.STREAM"; > >> Thank you. > >> > >> > > > > > > > > -- > > Regards, > > Sujay > > Princess Margaret - "I have as much privacy as a goldfish in a bowl." > > > > > > > > > -- Regards, Sujay Yogi Berra <http://www.brainyquote.com/quotes/authors/y/yogi_berra.html> - "I never said most of the things I said." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---