I have to send email and sms just by clicking email button or sms button in my application.I tried using sharing intents, but it displays the list of email,gmail.facebook etc..I dont want that list to appear just a single click has to sent email to the user from email button.can anyone give ideas..
I have posted my code also..
public class SharecontentActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button sharingButton = (Button) findViewById(R.id.button_share);
sharingButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
shareIt();
}
});
}
private void shareIt() {
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Request from CMH");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, " ");
startActivity(Intent.createChooser(sharingIntent, "Share via"));
}
}