Android: Some Common Intents

person Jason Huangfolder_openAndroid, Codelocal_offer, , access_time October 4, 2010

//Email Intent allow you launch android email program to send an email

Intent i = new Intent(Intent.ACTION_SEND);  
//i.setType("text/plain"); //use this line for testing in the emulator  
i.setType("message/rfc822") ; // use from live device
i.putExtra(Intent.EXTRA_EMAIL, new String[]{"test@gmail.com"});  
i.putExtra(Intent.EXTRA_SUBJECT,"subject goes here");  
i.putExtra(Intent.EXTRA_TEXT,"body goes here");  
startActivity(Intent.createChooser(i, "Select email application."));


Comment

  1. how can i pass double datatype values through putExtras:
    for example i have a code: In first activity:
    Value of A=Edittext1
    value of b=Edittext2
    one add button on clickin this it should show the result in another activity like:
    Result=Edittext3
    these values should be in double data type
    can any one code this plz help me out . thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>