• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Quick Question About Intents

I have the following event handling code for a button click event here:

Code:
        ibtnShare.setOnClickListener(new OnClickListener() {
         public void onClick(View v){
          Intent emailIntent  = new Intent(android.content.Intent.ACTION_SEND);
          emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Check this out");
          emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, facts[position]);
          emailIntent.setType("text/plain");
          startActivity(Intent.createChooser(emailIntent, "Send mail..."));
         }
        });

Whenever I click the button, it pulls up an option to send the data via text or email. How would one set this to where it only sends it via text message or via E-Mail?

Also is there any examples out there to show how to send something real simple to your Twitter or Facebook account?

Much thanks and kudos in advance.

- Forest
 
Back
Top Bottom