How to attach a file and send it through any email application like gmail,yahoo,hotmail etc
<p>This is my code..</p>

<pre><code>import java.io.File;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class EMailActivity extends Activity 
{
    Button send;
    EditText address, subject, emailtext ,emailcc;
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.email_layout);
        send=(Button) findViewById(R.id.emailsendbutton);
        address=(EditText) findViewById(R.id.emailaddress);
        subject=(EditText) findViewById(R.id.emailsubject);
        emailtext=(EditText) findViewById(R.id.emailtext);
        emailcc=(EditText) findViewById(R.id.emailcc);

        Intent myintent = getIntent();
        String ReqPath = myintent.getStringExtra("filepath");
        File fileIn = new File(ReqPath);
        final Uri u = Uri.fromFile(fileIn);

        send.setOnClickListener(new OnClickListener() 
        {
            public void onClick(View v) 
            {
                // TODO Auto-generated method stub

                final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

                emailIntent.setType("plain/text");

                emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{ address.getText().toString()});

                emailIntent.putExtra(android.content.Intent.EXTRA_CC,  new String[]{emailcc.getText().toString()});

                emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject.getText());

                emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, emailtext.getText());

                emailIntent.putExtra(Intent.EXTRA_STREAM, u);

                EMailActivity.this.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
                //finish();
            }
        });
    }

}
</code></pre>

<p>now whe i am sending this Info throgh send Button None Application Like Gmail,Yahoo etc comes.
Please help me out</p>
