I had this in my onOptionItemSelected
of menu. Whenever I try to run this intent it throws force close error.
case R.id.Mail:
Intent emailIntent=new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,message);
startActivity(emailIntent);
break;
The Intent is not deprecated the problem is with your itemClickable. class because it is not recognized. Either you have somehow enabled extra warnings that identify Intent as deprecated or something is really stack at your machine.
it might help you..
Intent email = new Intent(Intent.ACTION_SEND);
email.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"});
email.putExtra(Intent.EXTRA_SUBJECT, "Sunject Text Here..");
email.putExtra(Intent.EXTRA_TEXT, "");
email.setType("message/rfc822");
startActivity(Intent.createChooser(email, "Send Mail Using :"));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With