send a image file on sdcard with email not messaging or other options

by Gaurav » Mon, 06 Apr 2009 01:11:01 GMT


Sponsored Links
 I need to send an image file on my sdcard using email in my
application. Note that I don't want user to get option to use
messaging or other ways to send the file. My current code, as shown
below, gives option of both email and messaging whereas I want the
user to get only emailing option. How do I do this?

Intent intent = new Intent(Intent.ACTION_SEND);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setType("image/*");
intent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/sdcard/mydir/
myimage.jpg"));
startActivity(intent);

Gaurav
Software Developer
 http://SilkenMermaid.com 
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. With the new Froyo update, my app is being killed instead of running in the background

On Tue, Aug 10, 2010 at 3:11 PM, Streets Of Boston




It is?  News to me! :)

For the original poster -- if by "force close" you mean the app error
dialog, the #1 thing to do is look at the stack crawl in the log of the
error that caused the crash.  (You will also see these in android feedback,
which should be available on all devices running 2.2.)

Without at least a stack crawl, nobody can help you.  You have posted so
little information that you are just asking people to make wild guesses for
you.  Not productive for anyone.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 

2. Location from cell site or from Triangulation

Hi All,

I am working on the location based android app. I need to implement code
that find the location of the user, using cell site or triangulation.please
let me know how this can be done in android.

Please Help

-- 
Thanks and Regards
Ajmer Singh

-- 

3. With the new Froyo update, my app is being killed instead of running in the background

4. Launch App in device start-up

5. How to remove an activity from the navigation stack (without finishing)

6. Making HorizontalScrollView scroll programatically

7. With the new Froyo update, my app is being killed instead of running in the background